diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-03 16:43:19 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-03 16:44:37 +0100 |
commit | e114123df2a05650f0f7e34044c1e8f829c50a44 (patch) | |
tree | 48c408b469d5fc3f1acdf4468ad6f22da8a65370 /lss16toppm.c | |
parent | m (diff) | |
download | liblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.gz liblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.bz2 liblss16-e114123df2a05650f0f7e34044c1e8f829c50a44.tar.xz |
misc
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'lss16toppm.c')
-rw-r--r-- | lss16toppm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lss16toppm.c b/lss16toppm.c index 6dcff62..48c9b93 100644 --- a/lss16toppm.c +++ b/lss16toppm.c @@ -6,6 +6,10 @@ #include <string.h> #include <unistd.h> +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +#endif + static const char *argv0 = "lss16toppm"; @@ -41,7 +45,7 @@ main(int argc, char *argv[]) enum liblss16_decode_error error; int head_printed = 0; int print_colour_map = 0; - int have_stdout, len; + int have_stdout = 0, len; size_t i; /* cmdline syntax is inherited from the SYSLINUX implementation, @@ -52,11 +56,12 @@ main(int argc, char *argv[]) argc--; } - for (; argc; argc--, argv++) { + for (; argc--; argv++) { if (!strcmp(*argv, "-map")) { print_colour_map = 1; } else { fprintf(stderr, "%s: Unknown option: %s\n", argv0, *argv); + return 2; } } |