From 1e5c95d8d42d5cf4e13afd204a3d6e18e5c030bb Mon Sep 17 00:00:00 2001 From: Rangi Date: Sat, 16 Feb 2019 16:24:47 -0500 Subject: [PATCH] Silence gcc warnings, even in Travis -Wno-missing-field-initializers is needed because of false positives over {0} initialization --- tools/Makefile | 2 +- tools/lzcomp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index d29d5d748..768f8912e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,7 @@ .PHONY: all clean CC := gcc -CFLAGS := -O3 -std=c99 -Wall -Wextra +CFLAGS := -O3 -std=c99 -Wall -Wextra -Wno-missing-field-initializers tools := \ lzcomp \ diff --git a/tools/lzcomp.c b/tools/lzcomp.c index f2669aef8..562a5ec08 100644 --- a/tools/lzcomp.c +++ b/tools/lzcomp.c @@ -128,7 +128,7 @@ void write_commands_to_textfile (const char * file, const struct command * comma void write_command_to_textfile (FILE * fp, struct command command, const unsigned char * input_stream) { if ((!command.count) || (command.count > 1024)) error_exit(2, "invalid command in output stream"); - int rv, pos; + int rv = -1, pos; const char * kind; switch (command.command) { case 0: