* lib/quotearg.c (quotearg_buffer_restyled): Use switch (+E), and
omit default case, to pacify gcc -Wswitch-enum. This is a good
way to pacify -Wswitch-enum when we don’t want to enumerate
all the enum values. Omit unnecessary ‘default: break;’s.
2025-02-02 Paul Eggert <eggert@cs.ucla.edu>
+ quotearg: pacify -Wswitch-enum
+ * lib/quotearg.c (quotearg_buffer_restyled): Use switch (+E), and
+ omit default case, to pacify gcc -Wswitch-enum. This is a good
+ way to pacify -Wswitch-enum when we don’t want to enumerate
+ all the enum values. Omit unnecessary ‘default: break;’s.
+
test-gettext-h: check call results
* tests/test-gettext-h.c: Include string.h.
(main): Check return values of calls.
break;
case '?':
- switch (quoting_style)
+ switch (+quoting_style)
{
case shell_always_quoting_style:
if (elide_outer_quotes)
STORE ('"');
STORE ('?');
break;
-
- default:
- break;
}
break;
-
- default:
- break;
}
break;
case '[': case '\\': case '^':
case '`': case '|':
goto force_outer_quoting_style;
-
- default:
- break;
}
}