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>
This commit is contained in:
parent
3ffd710e12
commit
0b65b9e105
2
configure
vendored
2
configure
vendored
@ -140,7 +140,7 @@ LDFLAGS="-g $LDFLAGS"
|
|||||||
|
|
||||||
gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
|
gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
|
||||||
gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
|
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"
|
gcc_flags="-fstack-protector-all $gcc_flags"
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
|
@ -63,7 +63,6 @@ for input; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo >> $output
|
echo >> $output
|
||||||
echo "extern const char *const xml_builtin[][2];" >> $output
|
|
||||||
echo "const char *const xml_builtin[][2] = {" >> $output
|
echo "const char *const xml_builtin[][2] = {" >> $output
|
||||||
|
|
||||||
for input; do
|
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)
|
static const char *get_feature_xml(const char *p, const char **newp)
|
||||||
{
|
{
|
||||||
extern const char *const xml_builtin[][2];
|
|
||||||
size_t len;
|
size_t len;
|
||||||
int i;
|
int i;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
Loading…
Reference in New Issue
Block a user