Re: [PATCH 5/6] tr2: do compiler enum check in trace2_collect_process_info()
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 26, 2021, 03:23 UTC
- Message-ID
- <YScJO9SY+H4KbHFV@nand.local>
- In-Reply-To
- <patch-5.6-4e378da2cce-20210825T231400Z-avarab@gmail.com>
On Thu, Aug 26, 2021 at 01:19:23AM +0200, Ævar Arnfjörð Bjarmason wrote:
> Change code added in 2f732bf15e6 (tr2: log parent process name, > 2021-07-21) to use a switch statement without a "default" branch to > have the compiler error if this code ever drifts out of sync with the > members of the "enum trace2_process_info_reason".
OK... arguably this code should have been written with a switch statement to begin with, but this looks like unnecessary churn to me. Maybe the next patch adds a new value of this enum? Let's see.
Thanks, Taylor