diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-09-18 07:02:16 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-09-18 07:02:16 +0000 |
commit | 27e677c0bbaddb4d59e5a3cb57a82c9ffee5564a (patch) | |
tree | 3fafeb29affbd6fbde420990459c28aea27e9cbe | |
parent | 94010c90ac62afe5a21725392ec5308d1e11153a (diff) | |
download | qemu-27e677c0bbaddb4d59e5a3cb57a82c9ffee5564a.tar.gz qemu-27e677c0bbaddb4d59e5a3cb57a82c9ffee5564a.tar.bz2 qemu-27e677c0bbaddb4d59e5a3cb57a82c9ffee5564a.zip |
Use gcc warning flag -Wnested-externs
If the compiler supports the warning flag -Wnested-externs, use it.
Avoid the only warning by moving the declaration of xml_builtin to a
more proper place.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | feature_to_c.sh | 1 | ||||
-rw-r--r-- | gdbstub.c | 1 | ||||
-rw-r--r-- | gdbstub.h | 3 |
4 files changed, 4 insertions, 3 deletions
@@ -140,7 +140,7 @@ LDFLAGS="-g $LDFLAGS" gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits" gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags" -gcc_flags="-Wmissing-include-dirs -Wempty-body $gcc_flags" +gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" gcc_flags="-fstack-protector-all $gcc_flags" cat > $TMPC << EOF int main(void) { return 0; } diff --git a/feature_to_c.sh b/feature_to_c.sh index dbf9f19c91..0994d9546e 100644 --- a/feature_to_c.sh +++ b/feature_to_c.sh @@ -63,7 +63,6 @@ for input; do done echo >> $output -echo "extern const char *const xml_builtin[][2];" >> $output echo "const char *const xml_builtin[][2] = {" >> $output for input; do @@ -1504,7 +1504,6 @@ static int memtox(char *buf, const char *mem, int len) static const char *get_feature_xml(const char *p, const char **newp) { - extern const char *const xml_builtin[][2]; size_t len; int i; const char *name; @@ -38,4 +38,7 @@ int gdbserver_start(int); int gdbserver_start(const char *port); #endif +/* in gdbstub-xml.c, generated by feature_to_c.sh */ +extern const char *const xml_builtin[][2]; + #endif |