From 41de123de0453274fb2e5b2192548ce274ad8deb Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Tue, 28 May 2024 12:01:33 +0300 Subject: Removed non-C99-compliant declaration after label default in config-parser.c --- config-parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config-parser.c b/config-parser.c index e10275f..ef67a8e 100644 --- a/config-parser.c +++ b/config-parser.c @@ -102,6 +102,7 @@ Result parse_config(int argc, char* argv[]) { size_t opt_i = 0; while (++opt_i < arglen) { + size_t msg_size; char opt = *(argument + opt_i); switch (opt) { case 'h': @@ -113,7 +114,7 @@ Result parse_config(int argc, char* argv[]) { case 'p': next_is_precision = true; if (opt_i != arglen - 1) { - size_t msg_size = 75; + msg_size = 75; char* error_msg = malloc(msg_size); snprintf( @@ -129,7 +130,7 @@ Result parse_config(int argc, char* argv[]) { tmp.help = true; break; default: - size_t msg_size = 20; + msg_size = 20; char* error_msg = malloc(msg_size); snprintf( error_msg, -- cgit v1.2.3