Permalink
Browse files

Enable -Wextra, with some minor caveats.

In recent gcc, -Wextra gives you a lot of pretty good info, so it's
worth using.  It also has some not very useful things.

This patch enables -Wextra and then turns off some of the more annoying,
less concretely a problem cases.

Signed-off-by: Peter Jones <pjones@redhat.com>
  • Loading branch information...
vathpela committed Jun 2, 2017
1 parent 21a5dbb commit 46c276f8bdfb804aad9d07ad9f66a37726e97fc1
Showing with 4 additions and 2 deletions.
  1. +2 −2 Makefile.am
  2. +2 −0 src/bin/smbios-get-ut-data.c
View
@@ -18,8 +18,8 @@ lib_LTLIBRARIES=
TESTS=
AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\"
AM_CFLAGS = -Wall -fPIC
AM_CXXFLAGS = -Wall -fPIC
AM_CFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -fPIC
AM_CXXFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -fPIC
AM_LDADD = $(LIBINTL)
AM_LDFLAGS = -L$(top_builddir)/out/
@@ -177,7 +177,9 @@ void dumpMem( const char *fn, size_t offset, size_t len)
memory_read(buf, offset, len);
int recs = fwrite(buf, len, 1, fd);
if (recs != 1)
{
; // nada
}
free(buf);
fclose(fd);
}

0 comments on commit 46c276f

Please sign in to comment.