|
|
05c763 |
From 5363df45176e6052ab828432dc47258d149489ff Mon Sep 17 00:00:00 2001
|
|
|
05c763 |
From: Peter Jones <pjones@redhat.com>
|
|
|
05c763 |
Date: Fri, 2 Jun 2017 12:48:41 -0400
|
|
|
05c763 |
Subject: [PATCH 06/22] Enable -Wextra, with some minor caveats.
|
|
|
05c763 |
|
|
|
05c763 |
In recent gcc, -Wextra gives you a lot of pretty good info, so it's
|
|
|
05c763 |
worth using. It also has some not very useful things.
|
|
|
05c763 |
|
|
|
05c763 |
This patch enables -Wextra and then turns off some of the more annoying,
|
|
|
05c763 |
less concretely a problem cases.
|
|
|
05c763 |
|
|
|
05c763 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
05c763 |
---
|
|
|
05c763 |
src/bin/smbios-get-ut-data.c | 2 ++
|
|
|
05c763 |
Makefile.am | 4 ++--
|
|
|
05c763 |
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
05c763 |
|
|
|
05c763 |
diff --git a/src/bin/smbios-get-ut-data.c b/src/bin/smbios-get-ut-data.c
|
|
|
05c763 |
index 0387326181d..11875941594 100644
|
|
|
05c763 |
--- a/src/bin/smbios-get-ut-data.c
|
|
|
05c763 |
+++ b/src/bin/smbios-get-ut-data.c
|
|
|
05c763 |
@@ -177,7 +177,9 @@ void dumpMem( const char *fn, size_t offset, size_t len)
|
|
|
05c763 |
memory_read(buf, offset, len);
|
|
|
05c763 |
int recs = fwrite(buf, len, 1, fd);
|
|
|
05c763 |
if (recs != 1)
|
|
|
05c763 |
+ {
|
|
|
05c763 |
; // nada
|
|
|
05c763 |
+ }
|
|
|
05c763 |
free(buf);
|
|
|
05c763 |
fclose(fd);
|
|
|
05c763 |
}
|
|
|
05c763 |
diff --git a/Makefile.am b/Makefile.am
|
|
|
05c763 |
index 7648132d968..8b9f4185bc1 100644
|
|
|
05c763 |
--- a/Makefile.am
|
|
|
05c763 |
+++ b/Makefile.am
|
|
|
05c763 |
@@ -18,8 +18,8 @@ lib_LTLIBRARIES=
|
|
|
05c763 |
TESTS=
|
|
|
05c763 |
|
|
|
05c763 |
AM_CPPFLAGS = -I$(top_builddir)/out/include -I$(top_srcdir)/src/include -DLIBSMBIOS_LOCALEDIR=\"$(localedir)\"
|
|
|
05c763 |
-AM_CFLAGS = -Wall -fPIC
|
|
|
05c763 |
-AM_CXXFLAGS = -Wall -fPIC
|
|
|
05c763 |
+AM_CFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -fPIC
|
|
|
05c763 |
+AM_CXXFLAGS = -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -fPIC
|
|
|
05c763 |
AM_LDADD = $(LIBINTL)
|
|
|
05c763 |
|
|
|
05c763 |
AM_LDFLAGS = -L$(top_builddir)/out/
|
|
|
05c763 |
--
|
|
|
05c763 |
2.14.3
|
|
|
05c763 |
|