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 <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds 2018-03-11 12:08:13 -07:00
parent 7444cca876
commit f5e10ff9bc
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}