[Crosstoolchain-logs] [device-tree-compiler] 346/357: dtc: Enable more warnings

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 74f6a51b1f71ffc7d9557e063630469a93eeddec
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Tue Mar 9 10:49:33 2010 +1100

    dtc: Enable more warnings
    
    This patch turns on a bunch of extra gcc warnings, most of which are
    probably a good idea.  Of the new warnings -Wnested-externs and
    -Wstrict-prototypes need no code changes, we're already warning-clean.
    The remaining one, -Wmissing-prototypes requires trivial changes in
    some of the tests (making functions local).
    
    This patch also rearranges the warnings flags into a separate make
    variable for convenience, and turns on -Werror, to really encourage
    people to keep the code warning-clean.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 Makefile                       | 4 +++-
 tests/extra-terminating-null.c | 2 +-
 tests/get_alias.c              | 2 +-
 tests/path_offset_aliases.c    | 2 +-
 tests/value-labels.c           | 4 ++--
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index d7549b2..b49aebb 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,9 @@ LOCAL_VERSION =
 CONFIG_LOCALVERSION =
 
 CPPFLAGS = -I libfdt
-CFLAGS = -Wall -g -Os -fPIC -Wpointer-arith -Wcast-qual
+WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
+	-Wstrict-prototypes -Wmissing-prototypes
+CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
 
 BISON = bison
 LEX = flex
diff --git a/tests/extra-terminating-null.c b/tests/extra-terminating-null.c
index bb71b1a..8a2043f 100644
--- a/tests/extra-terminating-null.c
+++ b/tests/extra-terminating-null.c
@@ -28,7 +28,7 @@
 #include "tests.h"
 #include "testdata.h"
 
-void check_extranull(void *fdt, const char *prop, const char *str, int numnulls)
+static void check_extranull(void *fdt, const char *prop, const char *str, int numnulls)
 {
 	int len = strlen(str);
 	char checkbuf[len+numnulls];
diff --git a/tests/get_alias.c b/tests/get_alias.c
index 8eeaee4..1e0faf4 100644
--- a/tests/get_alias.c
+++ b/tests/get_alias.c
@@ -29,7 +29,7 @@
 #include "tests.h"
 #include "testdata.h"
 
-void check_alias(void *fdt, const char *path, const char *alias)
+static void check_alias(void *fdt, const char *path, const char *alias)
 {
 	const char *aliaspath;
 
diff --git a/tests/path_offset_aliases.c b/tests/path_offset_aliases.c
index 191edd2..3682da4 100644
--- a/tests/path_offset_aliases.c
+++ b/tests/path_offset_aliases.c
@@ -29,7 +29,7 @@
 #include "tests.h"
 #include "testdata.h"
 
-void check_alias(void *fdt, const char *full_path, const char *alias_path)
+static void check_alias(void *fdt, const char *full_path, const char *alias_path)
 {
 	int offset, offset_a;
 
diff --git a/tests/value-labels.c b/tests/value-labels.c
index c5aea8f..abe2721 100644
--- a/tests/value-labels.c
+++ b/tests/value-labels.c
@@ -59,8 +59,8 @@ struct val_label labels3[] = {
 	{ "end3", -1 },
 };
 
-void check_prop_labels(void *sohandle, void *fdt, const char *name,
-		       const struct val_label* labels, int n)
+static void check_prop_labels(void *sohandle, void *fdt, const char *name,
+			      const struct val_label* labels, int n)
 {
 	const struct fdt_property *prop;
 	const char *p;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list