usage_long_opts and usage_opts_help should always have the same length. Since these are fixed length arrays, this can be checked at compile time with _Static_assert (requires C11). Signed-off-by: Charles Perry <charles.perry@xxxxxxxxxxxxxxxxxxxx> --- dtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dtc.c b/dtc.c index 0655c2e..1f38b97 100644 --- a/dtc.c +++ b/dtc.c @@ -112,6 +112,8 @@ static const char * const usage_opts_help[] = { "\n\tPrint version and exit", NULL, }; +_Static_assert(ARRAY_SIZE(usage_long_opts) == ARRAY_SIZE(usage_opts_help), + "usage_long_opts and usage_opts_help length differ"); static const char *guess_type_by_name(const char *fname, const char *fallback) { -- 2.34.1