diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-12-26 19:08:48 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-12-26 19:08:48 +0000 |
commit | ee483bab1e0d0e6acdb0310007757c00d10f64c2 (patch) | |
tree | 425ca084bce7c1b016c4a9f64e24a0e8cbc7542d /cpp/test | |
parent | Fixed (ICE-5035) - Added check to detect mingw compiler (diff) | |
download | ice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.tar.bz2 ice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.tar.xz ice-ee483bab1e0d0e6acdb0310007757c00d10f64c2.zip |
Fixed GCC warnings; added -Werror to GCC builds
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Freeze/complex/Scanner.cpp | 27 | ||||
-rw-r--r-- | cpp/test/Freeze/complex/Scanner.l | 5 | ||||
-rw-r--r-- | cpp/test/Ice/background/EndpointI.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Ice/hash/Client.cpp | 4 | ||||
-rw-r--r-- | cpp/test/Ice/operations/Twoways.cpp | 7 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TwowaysAMI.cpp | 7 | ||||
-rw-r--r-- | cpp/test/Ice/operations/TwowaysNewAMI.cpp | 7 |
7 files changed, 50 insertions, 11 deletions
diff --git a/cpp/test/Freeze/complex/Scanner.cpp b/cpp/test/Freeze/complex/Scanner.cpp index a3f371f18bc..02621eabd56 100644 --- a/cpp/test/Freeze/complex/Scanner.cpp +++ b/cpp/test/Freeze/complex/Scanner.cpp @@ -482,6 +482,11 @@ char *yytext; # pragma warning( 4 : 4244 ) #endif +#if defined(__GNUC__) +# pragma GCC diagnostic warning "-Wunused-function" +#endif + + using namespace std; using namespace Ice; @@ -505,7 +510,7 @@ using namespace Ice; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 508 "lex.yy.c" +#line 513 "lex.yy.c" #define INITIAL 0 @@ -594,7 +599,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -605,7 +610,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -687,10 +692,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 62 "Scanner.l" +#line 67 "Scanner.l" -#line 693 "lex.yy.c" +#line 698 "lex.yy.c" if ( !(yy_init) ) { @@ -771,7 +776,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 64 "Scanner.l" +#line 69 "Scanner.l" { *yylvalp = new Complex::NumberNodeI(atoi(yytext)); return TOK_NUMBER; @@ -779,20 +784,20 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 69 "Scanner.l" +#line 74 "Scanner.l" /* eat whitespace */ YY_BREAK case 3: YY_RULE_SETUP -#line 71 "Scanner.l" +#line 76 "Scanner.l" { return *yytext; } YY_BREAK case 4: YY_RULE_SETUP -#line 73 "Scanner.l" +#line 78 "Scanner.l" ECHO; YY_BREAK -#line 795 "lex.yy.c" +#line 800 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1787,7 +1792,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 73 "Scanner.l" +#line 78 "Scanner.l" diff --git a/cpp/test/Freeze/complex/Scanner.l b/cpp/test/Freeze/complex/Scanner.l index 4461779e8df..f52249c7262 100644 --- a/cpp/test/Freeze/complex/Scanner.l +++ b/cpp/test/Freeze/complex/Scanner.l @@ -27,6 +27,11 @@ # pragma warning( 4 : 4244 ) #endif +#if defined(__GNUC__) +# pragma GCC diagnostic warning "-Wunused-function" +#endif + + using namespace std; using namespace Ice; diff --git a/cpp/test/Ice/background/EndpointI.cpp b/cpp/test/Ice/background/EndpointI.cpp index c1f872691db..52e2a23e513 100644 --- a/cpp/test/Ice/background/EndpointI.cpp +++ b/cpp/test/Ice/background/EndpointI.cpp @@ -18,6 +18,10 @@ #pragma warning( disable : 4996 ) #endif +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + using namespace std; Ice::Short EndpointI::TYPE_BASE = 100; diff --git a/cpp/test/Ice/hash/Client.cpp b/cpp/test/Ice/hash/Client.cpp index 4bdd32591a7..520e946b7f5 100644 --- a/cpp/test/Ice/hash/Client.cpp +++ b/cpp/test/Ice/hash/Client.cpp @@ -17,6 +17,10 @@ #pragma warning( disable : 4996 ) #endif +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + using namespace std; using namespace Test; diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp index d59e18810d8..bfdff90c137 100644 --- a/cpp/test/Ice/operations/Twoways.cpp +++ b/cpp/test/Ice/operations/Twoways.cpp @@ -22,6 +22,13 @@ # undef max #endif +// +// Work-around for GCC warning bug +// +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + using namespace std; namespace diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp index 5e1c54e6df5..525da24d6b7 100644 --- a/cpp/test/Ice/operations/TwowaysAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysAMI.cpp @@ -12,6 +12,13 @@ #include <Test.h> #include <limits> +// +// Work-around for GCC warning bug +// +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + using namespace std; namespace diff --git a/cpp/test/Ice/operations/TwowaysNewAMI.cpp b/cpp/test/Ice/operations/TwowaysNewAMI.cpp index 212bc12d6fd..647cc58c032 100644 --- a/cpp/test/Ice/operations/TwowaysNewAMI.cpp +++ b/cpp/test/Ice/operations/TwowaysNewAMI.cpp @@ -11,6 +11,13 @@ #include <TestCommon.h> #include <Test.h> +// +// Work-around for GCC warning bug +// +#if defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + using namespace std; namespace |