From f5e10ff9bcb1963f8b1d1b2971244b39287d46e5 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 11 Mar 2018 12:08:13 -0700 Subject: [PATCH] get rid of annoying compile warnings This gets rid of the warnings in the build, mostly by just disabling them entirely, and in one case by adding a default statement to make the compiler not warn about lacking case statements for a switch() statement. Some of the warnings really don't work that well for libdivecomputer (warning about pointer signs is very annoying when we mix regular strings and various "unsigned char *" raw data). And some of the warnings we should probably re-enable once by one, and actually fix up. But even the ones we should re-enable are right now more of a pain than they are worth, and nobody has had the energy to do so. And as long as there are *so* many warnings, nobody likely will. In the meantime, this gets rid of the harmless warnings, so that we can see if any *bad* warnings happen. Signed-off-by: Linus Torvalds --- configure.ac | 6 +++++- src/suunto_eonsteel_parser.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cf0a56d..927d8e5 100644 --- a/configure.ac +++ b/configure.ac @@ -187,12 +187,16 @@ AX_APPEND_COMPILE_FLAGS([ \ -Wrestrict \ -Wformat=2 \ -Wwrite-strings \ - -Wcast-qual \ -Wpointer-arith \ -Wstrict-prototypes \ -Wmissing-prototypes \ -Wmissing-declarations \ -Wno-unused-parameter \ + -Wno-unused-function \ + -Wno-unused-variable \ + -Wno-unused-but-set-variable \ + -Wno-pointer-sign \ + -Wno-shadow \ ]) # Windows specific compiler options. diff --git a/src/suunto_eonsteel_parser.c b/src/suunto_eonsteel_parser.c index ffdd172..b48b701 100644 --- a/src/suunto_eonsteel_parser.c +++ b/src/suunto_eonsteel_parser.c @@ -1462,6 +1462,8 @@ static int traverse_sample_fields(suunto_eonsteel_parser_t *eon, const struct ty set_depth_field(eon, array_uint16_le(data)); data += 2; continue; + default: + break; } break; }