From: Bruno Haible Date: Wed, 2 Apr 2008 22:07:16 +0000 (+0200) Subject: Avoid some warnings from "gcc -Wshadow". X-Git-Tag: v0.1~7611 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=b93d3c84b3547d092bb69ea983ac87573f0a5ad3;p=gnulib.git Avoid some warnings from "gcc -Wshadow". --- diff --git a/ChangeLog b/ChangeLog index 9232d1d51..0fae6b5b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-04-02 Bruno Haible + + Avoid some warnings from "gcc -Wshadow". + * tests/tests-vfprintf-posix.c (my_fprintf): Move after test_function. + * tests/tests-vprintf-posix.c (my_printf): Move after test_function. + * tests/tests-vsnprintf-posix.c (my_snprintf): Move after test_function. + * tests/tests-vsprintf-posix.c (my_sprintf): Move after test_function. + Reported by Jim Meyering. + 2008-04-01 Bruno Haible Fix test to work on IRIX 6.5 with cc. diff --git a/tests/test-vfprintf-posix.c b/tests/test-vfprintf-posix.c index 2af148df6..68fc2173d 100644 --- a/tests/test-vfprintf-posix.c +++ b/tests/test-vfprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,6 +38,8 @@ } \ while (0) +#include "test-fprintf-posix.h" + static int my_fprintf (FILE *fp, const char *format, ...) { @@ -50,8 +52,6 @@ my_fprintf (FILE *fp, const char *format, ...) return ret; } -#include "test-fprintf-posix.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-vprintf-posix.c b/tests/test-vprintf-posix.c index 78a250614..d30a95f0b 100644 --- a/tests/test-vprintf-posix.c +++ b/tests/test-vprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vfprintf() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,6 +38,8 @@ } \ while (0) +#include "test-printf-posix.h" + static int my_printf (const char *format, ...) { @@ -50,8 +52,6 @@ my_printf (const char *format, ...) return ret; } -#include "test-printf-posix.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-vsnprintf-posix.c b/tests/test-vsnprintf-posix.c index 110cf6921..841a1ec66 100644 --- a/tests/test-vsnprintf-posix.c +++ b/tests/test-vsnprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsnprintf() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,6 +40,8 @@ } \ while (0) +#include "test-snprintf-posix.h" + static int my_snprintf (char *str, size_t size, const char *format, ...) { @@ -52,8 +54,6 @@ my_snprintf (char *str, size_t size, const char *format, ...) return ret; } -#include "test-snprintf-posix.h" - int main (int argc, char *argv[]) { diff --git a/tests/test-vsprintf-posix.c b/tests/test-vsprintf-posix.c index 6c59c64d5..a2a13074b 100644 --- a/tests/test-vsprintf-posix.c +++ b/tests/test-vsprintf-posix.c @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() function. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,6 +40,8 @@ } \ while (0) +#include "test-sprintf-posix.h" + static int my_sprintf (char *str, const char *format, ...) { @@ -52,8 +54,6 @@ my_sprintf (char *str, const char *format, ...) return ret; } -#include "test-sprintf-posix.h" - int main (int argc, char *argv[]) {