diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-21 15:37:51 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-21 15:37:51 -0400 |
| commit | 0b76011a45b421b1473e9be75e538d3ceadf1140 (patch) | |
| tree | 5738f89e0fb55235e0a3fda861db1a2dde2bd063 /stdlib/stdlib.c | |
| parent | 013995b146a5984a7bd053ad33aae88d42838868 (diff) | |
Remove some less-supported code features like static initializers for
variable-sized arrays
Diffstat (limited to 'stdlib/stdlib.c')
| -rw-r--r-- | stdlib/stdlib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index 9b117a24..9103e4dd 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -224,8 +224,10 @@ static Table_t parse_table(const TypeInfo_t *table, int n, char *args[]) #pragma GCC diagnostic ignored "-Wstack-protector" public void _tomo_parse_args(int argc, char *argv[], Text_t usage, Text_t help, int spec_len, cli_arg_t spec[spec_len]) { - bool populated_args[spec_len] = {}; - bool used_args[argc] = {}; + bool populated_args[spec_len]; + bool used_args[argc]; + memset(populated_args, 0, sizeof(populated_args)); + memset(used_args, 0, sizeof(used_args)); for (int i = 1; i < argc; ) { if (argv[i][0] == '-' && argv[i][1] == '-') { if (argv[i][2] == '\0') { // "--" signals the rest of the arguments are literal |
