diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-02-03 10:04:58 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-02-03 10:04:58 -0330 |
commit | 0c9eca09e0140dbdc6e954d8d1475cf99c52073d (patch) | |
tree | 674c29c884de6cb8a86f3ccabd2d1d69334133d4 | |
parent | Fixed compiler warning/error (diff) | |
download | ice-0c9eca09e0140dbdc6e954d8d1475cf99c52073d.tar.bz2 ice-0c9eca09e0140dbdc6e954d8d1475cf99c52073d.tar.xz ice-0c9eca09e0140dbdc6e954d8d1475cf99c52073d.zip |
ICE-5814 build linix/osx demos with high warning levels in git
158 files changed, 1823 insertions, 1258 deletions
diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin index cf5cf0c6a93..2a8cae9aee5 100644 --- a/cpp/config/Make.rules.Darwin +++ b/cpp/config/Make.rules.Darwin @@ -18,6 +18,11 @@ CXX = xcrun clang++ CPPFLAGS += -pthread -fvisibility=hidden CXXFLAGS += -Wall -Werror -mmacosx-version-min=$(OSX_TARGET_MIN_SDK_VERSION) +# If MAXWARN is set then enable extra warnings +ifeq ($(MAXWARN),yes) + CXXFLAGS += -Wextra -Wshadow -Wredundant-decls +endif + # # By default we build x86_64 binaries. # diff --git a/cpp/config/Make.rules.Linux b/cpp/config/Make.rules.Linux index 4a993706651..bb6fa2dbd92 100644 --- a/cpp/config/Make.rules.Linux +++ b/cpp/config/Make.rules.Linux @@ -81,6 +81,15 @@ ifeq ($(CXX),g++) CXXFLAGS += $(CXXARCHFLAGS) -fvisibility=hidden -Wall -Werror -pthread + # If MAXWARN is set then enable extra warnings + ifeq ($(MAXWARN),yes) + CXXFLAGS += -Wextra -Wshadow + GCC_GTEQ_460 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40600) + ifeq ($(GCC_GTEQ_460),1) + CXXFLAGS += -Wredundant-decls + endif + endif + ifneq ($(GENPIC),no) CXXFLAGS += -fPIC endif diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak index c5e07d7ad86..88f4640802a 100755 --- a/cpp/config/Make.rules.mak +++ b/cpp/config/Make.rules.mak @@ -110,10 +110,6 @@ includedir = $(top_srcdir)\include includedir = $(ice_dir)\include !endif -!if exist ($(top_srcdir)\..\.gitignore) -ice_git_dist = 1 -!endif - install_bindir = $(prefix)\bin$(x64suffix) install_libdir = $(prefix)\lib$(x64suffix) install_includedir = $(prefix)\include diff --git a/cpp/demo/Database/Oracle/Makefile b/cpp/demo/Database/Oracle/Makefile index 2e70ed8d50f..55e0813c282 100644 --- a/cpp/demo/Database/Oracle/Makefile +++ b/cpp/demo/Database/Oracle/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + include $(top_srcdir)/config/Make.rules SUBDIRS = proc occi diff --git a/cpp/demo/Database/Oracle/occi/Makefile b/cpp/demo/Database/Oracle/occi/Makefile index 1fcab0dc926..0a0734c1565 100644 --- a/cpp/demo/Database/Oracle/occi/Makefile +++ b/cpp/demo/Database/Oracle/occi/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Database/Oracle/occi/Makefile.mak b/cpp/demo/Database/Oracle/occi/Makefile.mak index 5259bd270b3..9f0c58b080c 100644 --- a/cpp/demo/Database/Oracle/occi/Makefile.mak +++ b/cpp/demo/Database/Oracle/occi/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Database/Oracle/proc/Makefile b/cpp/demo/Database/Oracle/proc/Makefile index 9fe19024ad1..9e208e3845c 100644 --- a/cpp/demo/Database/Oracle/proc/Makefile +++ b/cpp/demo/Database/Oracle/proc/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Database/Oracle/proc/Makefile.mak b/cpp/demo/Database/Oracle/proc/Makefile.mak index 56a53b73647..a416cdfb244 100644 --- a/cpp/demo/Database/Oracle/proc/Makefile.mak +++ b/cpp/demo/Database/Oracle/proc/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Freeze/backup/Makefile b/cpp/demo/Freeze/backup/Makefile index b9c561bb000..4138c7a4f1b 100644 --- a/cpp/demo/Freeze/backup/Makefile +++ b/cpp/demo/Freeze/backup/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client TARGETS = $(CLIENT) diff --git a/cpp/demo/Freeze/backup/Makefile.mak b/cpp/demo/Freeze/backup/Makefile.mak index 1350cc472c5..f52eaabc34e 100644 --- a/cpp/demo/Freeze/backup/Makefile.mak +++ b/cpp/demo/Freeze/backup/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe TARGETS = $(CLIENT) diff --git a/cpp/demo/Freeze/bench/Makefile b/cpp/demo/Freeze/bench/Makefile index 36e725453e7..4451d1d2c90 100644 --- a/cpp/demo/Freeze/bench/Makefile +++ b/cpp/demo/Freeze/bench/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client TARGETS = $(CLIENT) diff --git a/cpp/demo/Freeze/bench/Makefile.mak b/cpp/demo/Freeze/bench/Makefile.mak index 9e43056d618..298f0782116 100644 --- a/cpp/demo/Freeze/bench/Makefile.mak +++ b/cpp/demo/Freeze/bench/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe TARGETS = $(CLIENT) diff --git a/cpp/demo/Freeze/casino/BetI.cpp b/cpp/demo/Freeze/casino/BetI.cpp index 29bc9427589..5405bdb7a77 100644 --- a/cpp/demo/Freeze/casino/BetI.cpp +++ b/cpp/demo/Freeze/casino/BetI.cpp @@ -93,11 +93,11 @@ BetI::BetI() { } -BetI::BetI(int amount, Ice::Long closeTime, const CasinoStore::PersistentBankPrx& bank, +BetI::BetI(int amnt, Ice::Long clseTime, const CasinoStore::PersistentBankPrx& bank, const Freeze::TransactionalEvictorPtr& evictor, int bankEdge) { - this->amount = amount; - this->closeTime = closeTime; + amount = amnt; + closeTime = clseTime; init(evictor, bankEdge); potentialWinners.push_back(bank); } diff --git a/cpp/demo/Freeze/casino/BetResolver.cpp b/cpp/demo/Freeze/casino/BetResolver.cpp index 04c31e70f53..6787c92a334 100644 --- a/cpp/demo/Freeze/casino/BetResolver.cpp +++ b/cpp/demo/Freeze/casino/BetResolver.cpp @@ -34,9 +34,9 @@ BetResolver::add(const CasinoStore::PersistentBetPrx& bet, Ice::Long closeTime) { public: - Task(BetResolver& resolver, const CasinoStore::PersistentBetPrx& bet) : + Task(BetResolver& resolver, const CasinoStore::PersistentBetPrx& b) : _resolver(resolver), - _bet(bet) + _bet(b) { } diff --git a/cpp/demo/Freeze/casino/Makefile b/cpp/demo/Freeze/casino/Makefile index 6e196fe490e..ad8fcbcf655 100644 --- a/cpp/demo/Freeze/casino/Makefile +++ b/cpp/demo/Freeze/casino/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Freeze/casino/Makefile.mak b/cpp/demo/Freeze/casino/Makefile.mak index 6894b4f555b..a5be2916da5 100644 --- a/cpp/demo/Freeze/casino/Makefile.mak +++ b/cpp/demo/Freeze/casino/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Freeze/casino/Server.cpp b/cpp/demo/Freeze/casino/Server.cpp index 1ab3ca8d288..d70a3cd1b29 100644 --- a/cpp/demo/Freeze/casino/Server.cpp +++ b/cpp/demo/Freeze/casino/Server.cpp @@ -157,11 +157,11 @@ CasinoServer::run(int argc, char*[]) } virtual void - initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& /*facet*/, + initialize(const Ice::ObjectAdapterPtr& adptr, const Ice::Identity& identity, const string& /*facet*/, const Ice::ObjectPtr& servant) { CasinoStore::PersistentPlayerPrx prx = - CasinoStore::PersistentPlayerPrx::uncheckedCast(adapter->createProxy(identity)); + CasinoStore::PersistentPlayerPrx::uncheckedCast(adptr->createProxy(identity)); PlayerI* player = dynamic_cast<PlayerI*>(servant.get()); player->init(prx, _server._playerEvictor, _server._bankPrx); diff --git a/cpp/demo/Freeze/customEvictor/Client.cpp b/cpp/demo/Freeze/customEvictor/Client.cpp index 36dd563ffb0..0ad2ea226b9 100644 --- a/cpp/demo/Freeze/customEvictor/Client.cpp +++ b/cpp/demo/Freeze/customEvictor/Client.cpp @@ -49,7 +49,7 @@ public: // // Measures how long it takes to read 'readCount' items at random // - IceUtil::Time start = IceUtil::Time::now(IceUtil::Time::Monotonic); + IceUtil::Time startTime = IceUtil::Time::now(IceUtil::Time::Monotonic); try { @@ -58,15 +58,15 @@ public: int id = rand() % objectCount; ostringstream os; os << "P/N " << id; - string name = os.str(); + string nm = os.str(); Ice::Identity identity; - identity.name = name; + identity.name = nm; ItemPrx item = ItemPrx::uncheckedCast(_anItem->ice_identity(identity)); item->getDescription(); } _requestsPerSecond = - static_cast<int>(readCount / (IceUtil::Time::now(IceUtil::Time::Monotonic) - start).toSecondsDouble()); + static_cast<int>(readCount / (IceUtil::Time::now(IceUtil::Time::Monotonic) - startTime).toSecondsDouble()); } catch(const IceUtil::Exception& e) { @@ -101,7 +101,7 @@ public: // // Measure how long it takes to write 'writeCount' items at random. // - IceUtil::Time start = IceUtil::Time::now(IceUtil::Time::Monotonic); + IceUtil::Time startTime = IceUtil::Time::now(IceUtil::Time::Monotonic); try { @@ -111,16 +111,16 @@ public: ostringstream os; os << "P/N " << id; - string name = os.str(); + string nm = os.str(); Ice::Identity identity; - identity.name = name; + identity.name = nm; ItemPrx item = ItemPrx::uncheckedCast(_anItem->ice_identity(identity)); item->adjustStock(1); } _requestsPerSecond = - static_cast<int>(writeCount / (IceUtil::Time::now(IceUtil::Time::Monotonic) - start).toSecondsDouble()); + static_cast<int>(writeCount / (IceUtil::Time::now(IceUtil::Time::Monotonic) - startTime).toSecondsDouble()); } catch(const IceUtil::Exception& e) { diff --git a/cpp/demo/Freeze/customEvictor/Makefile b/cpp/demo/Freeze/customEvictor/Makefile index 1b8da43cc2a..28ef9fb033e 100644 --- a/cpp/demo/Freeze/customEvictor/Makefile +++ b/cpp/demo/Freeze/customEvictor/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Freeze/customEvictor/Makefile.mak b/cpp/demo/Freeze/customEvictor/Makefile.mak index da9cf0097c9..e16ea6f9044 100644 --- a/cpp/demo/Freeze/customEvictor/Makefile.mak +++ b/cpp/demo/Freeze/customEvictor/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Freeze/library/Grammar.cpp b/cpp/demo/Freeze/library/Grammar.cpp index ba7ab4fb741..f9550250060 100644 --- a/cpp/demo/Freeze/library/Grammar.cpp +++ b/cpp/demo/Freeze/library/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,51 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_HELP = 258, - TOK_EXIT = 259, - TOK_ADD_BOOK = 260, - TOK_FIND_ISBN = 261, - TOK_FIND_AUTHORS = 262, - TOK_NEXT_FOUND_BOOK = 263, - TOK_PRINT_CURRENT = 264, - TOK_RENT_BOOK = 265, - TOK_RETURN_BOOK = 266, - TOK_REMOVE_CURRENT = 267, - TOK_SET_EVICTOR_SIZE = 268, - TOK_SHUTDOWN = 269, - TOK_STRING = 270 - }; -#endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_ADD_BOOK 260 -#define TOK_FIND_ISBN 261 -#define TOK_FIND_AUTHORS 262 -#define TOK_NEXT_FOUND_BOOK 263 -#define TOK_PRINT_CURRENT 264 -#define TOK_RENT_BOOK 265 -#define TOK_RETURN_BOOK 266 -#define TOK_REMOVE_CURRENT 267 -#define TOK_SET_EVICTOR_SIZE 268 -#define TOK_SHUTDOWN 269 -#define TOK_STRING 270 - +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -112,6 +80,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -138,6 +107,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 112 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -156,20 +128,44 @@ yyerror(const char* s) # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_HELP = 258, + TOK_EXIT = 259, + TOK_ADD_BOOK = 260, + TOK_FIND_ISBN = 261, + TOK_FIND_AUTHORS = 262, + TOK_NEXT_FOUND_BOOK = 263, + TOK_PRINT_CURRENT = 264, + TOK_RENT_BOOK = 265, + TOK_RETURN_BOOK = 266, + TOK_REMOVE_CURRENT = 267, + TOK_SET_EVICTOR_SIZE = 268, + TOK_SHUTDOWN = 269, + TOK_STRING = 270 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 173 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 169 "Grammar.tab.c" #ifdef short # undef short @@ -244,14 +240,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -332,9 +328,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -368,12 +364,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -460,9 +456,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 59, 59, 63, 70, 73, 81, 85, 89, 93, - 97, 101, 105, 109, 113, 117, 121, 125, 129, 133, - 141, 146 + 0, 60, 60, 64, 71, 74, 82, 86, 90, 94, + 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, + 142, 147 }; #endif @@ -757,17 +753,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -801,11 +800,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1085,10 +1084,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1107,10 +1104,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1134,74 +1130,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; + /* Number of syntax errors so far. */ + int yynerrs; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1231,7 +1228,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1239,7 +1235,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1262,9 +1257,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1275,7 +1269,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1285,6 +1278,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1293,16 +1289,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1334,20 +1330,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1387,128 +1379,166 @@ yyreduce: switch (yyn) { case 2: -#line 60 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 61 "Grammar.y" { ;} break; case 3: -#line 63 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 64 "Grammar.y" { ;} break; case 4: -#line 71 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 72 "Grammar.y" { ;} break; case 5: -#line 74 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 75 "Grammar.y" { ;} break; case 6: -#line 82 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 83 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 86 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 87 "Grammar.y" { return 0; ;} break; case 8: -#line 90 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 91 "Grammar.y" { parser->addBook((yyvsp[(2) - (3)])); ;} break; case 9: -#line 94 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 95 "Grammar.y" { parser->findIsbn((yyvsp[(2) - (3)])); ;} break; case 10: -#line 98 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 99 "Grammar.y" { parser->findAuthors((yyvsp[(2) - (3)])); ;} break; case 11: -#line 102 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 103 "Grammar.y" { parser->nextFoundBook(); ;} break; case 12: -#line 106 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 107 "Grammar.y" { parser->printCurrent(); ;} break; case 13: -#line 110 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 111 "Grammar.y" { parser->rentCurrent((yyvsp[(2) - (3)])); ;} break; case 14: -#line 114 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 115 "Grammar.y" { parser->returnCurrent(); ;} break; case 15: -#line 118 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 119 "Grammar.y" { parser->removeCurrent(); ;} break; case 16: -#line 122 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 123 "Grammar.y" { parser->setEvictorSize((yyvsp[(2) - (3)])); ;} break; case 17: -#line 126 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 127 "Grammar.y" { parser->shutdown(); ;} break; case 18: -#line 130 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 131 "Grammar.y" { yyerrok; ;} break; case 19: -#line 134 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 135 "Grammar.y" { ;} break; case 20: -#line 142 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 143 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1516,15 +1546,18 @@ yyreduce: break; case 21: -#line 147 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 148 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); ;} break; -/* Line 1267 of yacc.c. */ -#line 1528 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1561 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1535,7 +1568,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1600,7 +1632,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1617,7 +1649,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1674,9 +1706,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1701,7 +1730,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1712,7 +1741,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1738,6 +1767,10 @@ yyreturn: } -#line 152 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 153 "Grammar.y" + + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/library/Grammar.h b/cpp/demo/Freeze/library/Grammar.h index f956ecdbf3a..06c71695747 100644 --- a/cpp/demo/Freeze/library/Grammar.h +++ b/cpp/demo/Freeze/library/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -54,30 +54,16 @@ TOK_STRING = 270 }; #endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_ADD_BOOK 260 -#define TOK_FIND_ISBN 261 -#define TOK_FIND_AUTHORS 262 -#define TOK_NEXT_FOUND_BOOK 263 -#define TOK_PRINT_CURRENT 264 -#define TOK_RENT_BOOK 265 -#define TOK_RETURN_BOOK 266 -#define TOK_REMOVE_CURRENT 267 -#define TOK_SET_EVICTOR_SIZE 268 -#define TOK_SHUTDOWN 269 -#define TOK_STRING 270 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/cpp/demo/Freeze/library/Grammar.y b/cpp/demo/Freeze/library/Grammar.y index a7d88e1dce6..05c7a9b58ab 100644 --- a/cpp/demo/Freeze/library/Grammar.y +++ b/cpp/demo/Freeze/library/Grammar.y @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -150,3 +151,5 @@ strings ; %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/library/LibraryI.cpp b/cpp/demo/Freeze/library/LibraryI.cpp index dba787134f5..33309475062 100644 --- a/cpp/demo/Freeze/library/LibraryI.cpp +++ b/cpp/demo/Freeze/library/LibraryI.cpp @@ -21,7 +21,7 @@ BookI::BookI(const LibraryIPtr& library) : void BookI::destroy(const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); if(_destroyed) { throw Ice::ObjectNotExistException(__FILE__, __LINE__); @@ -43,7 +43,7 @@ BookI::destroy(const Ice::Current&) Demo::BookDescription BookI::getBookDescription(const Ice::Current&) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); if(_destroyed) { @@ -59,7 +59,7 @@ BookI::getBookDescription(const Ice::Current&) const string BookI::getRenterName(const Ice::Current&) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); if(_destroyed) { @@ -76,7 +76,7 @@ BookI::getRenterName(const Ice::Current&) const void BookI::rentBook(const string& name, const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); if(_destroyed) { @@ -93,7 +93,7 @@ BookI::rentBook(const string& name, const Ice::Current&) void BookI::returnBook(const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); if(_destroyed) { @@ -156,7 +156,7 @@ LibraryI::LibraryI(const Ice::CommunicatorPtr& communicator, Demo::BookPrx LibraryI::createBook(const Demo::BookDescription& description, const Ice::Current& c) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); BookPrx book = IsbnToBook(c.adapter)(description.isbn); try @@ -231,7 +231,7 @@ LibraryI::findByIsbn(const string& isbn, const Ice::Current& c) const Demo::BookPrxSeq LibraryI::findByAuthors(const string& authors, const Ice::Current& c) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); // // Lookup all books that match the given authors, and return them @@ -268,7 +268,7 @@ LibraryI::shutdown(const Ice::Current& current) void LibraryI::remove(const BookDescription& description) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); // // Note: no need to catch and retry on deadlock since all access to diff --git a/cpp/demo/Freeze/library/Makefile b/cpp/demo/Freeze/library/Makefile index cca75005287..0b5959742f4 100644 --- a/cpp/demo/Freeze/library/Makefile +++ b/cpp/demo/Freeze/library/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server COLLOCATED = collocated diff --git a/cpp/demo/Freeze/library/Makefile.mak b/cpp/demo/Freeze/library/Makefile.mak index 7df43fd9dc3..4b0adfc992d 100644 --- a/cpp/demo/Freeze/library/Makefile.mak +++ b/cpp/demo/Freeze/library/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe diff --git a/cpp/demo/Freeze/library/Scanner.cpp b/cpp/demo/Freeze/library/Scanner.cpp index 7f3ceb08ad0..9416a950a2c 100644 --- a/cpp/demo/Freeze/library/Scanner.cpp +++ b/cpp/demo/Freeze/library/Scanner.cpp @@ -509,6 +509,7 @@ char *yytext; // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -553,7 +554,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 556 "lex.yy.c" +#line 557 "lex.yy.c" #define INITIAL 0 @@ -735,10 +736,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "Scanner.l" +#line 65 "Scanner.l" -#line 741 "lex.yy.c" +#line 742 "lex.yy.c" if ( !(yy_init) ) { @@ -823,7 +824,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 66 "Scanner.l" +#line 67 "Scanner.l" { // C++-style comment int c; @@ -836,7 +837,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 76 "Scanner.l" +#line 77 "Scanner.l" { // C-style comment while(true) @@ -864,84 +865,84 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 101 "Scanner.l" +#line 102 "Scanner.l" { return TOK_HELP; } YY_BREAK case 4: YY_RULE_SETUP -#line 105 "Scanner.l" +#line 106 "Scanner.l" { return TOK_EXIT; } YY_BREAK case 5: YY_RULE_SETUP -#line 109 "Scanner.l" +#line 110 "Scanner.l" { return TOK_ADD_BOOK; } YY_BREAK case 6: YY_RULE_SETUP -#line 113 "Scanner.l" +#line 114 "Scanner.l" { return TOK_FIND_ISBN; } YY_BREAK case 7: YY_RULE_SETUP -#line 117 "Scanner.l" +#line 118 "Scanner.l" { return TOK_FIND_AUTHORS; } YY_BREAK case 8: YY_RULE_SETUP -#line 121 "Scanner.l" +#line 122 "Scanner.l" { return TOK_NEXT_FOUND_BOOK; } YY_BREAK case 9: YY_RULE_SETUP -#line 125 "Scanner.l" +#line 126 "Scanner.l" { return TOK_PRINT_CURRENT; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "Scanner.l" +#line 130 "Scanner.l" { return TOK_RENT_BOOK; } YY_BREAK case 11: YY_RULE_SETUP -#line 133 "Scanner.l" +#line 134 "Scanner.l" { return TOK_RETURN_BOOK; } YY_BREAK case 12: YY_RULE_SETUP -#line 137 "Scanner.l" +#line 138 "Scanner.l" { return TOK_REMOVE_CURRENT; } YY_BREAK case 13: YY_RULE_SETUP -#line 141 "Scanner.l" +#line 142 "Scanner.l" { return TOK_SET_EVICTOR_SIZE; } YY_BREAK case 14: YY_RULE_SETUP -#line 145 "Scanner.l" +#line 146 "Scanner.l" { return TOK_SHUTDOWN; } @@ -949,7 +950,7 @@ YY_RULE_SETUP case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 149 "Scanner.l" +#line 150 "Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -964,14 +965,14 @@ YY_RULE_SETUP case 16: /* rule 16 can match eol */ YY_RULE_SETUP -#line 160 "Scanner.l" +#line 161 "Scanner.l" { return ';'; } YY_BREAK case 17: YY_RULE_SETUP -#line 164 "Scanner.l" +#line 165 "Scanner.l" { // "..."-type strings string s; @@ -1048,7 +1049,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 238 "Scanner.l" +#line 239 "Scanner.l" { // '...'-type strings string s; @@ -1076,7 +1077,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 263 "Scanner.l" +#line 264 "Scanner.l" { // Simple strings string s; @@ -1103,10 +1104,10 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 287 "Scanner.l" +#line 288 "Scanner.l" ECHO; YY_BREAK -#line 1109 "lex.yy.c" +#line 1110 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2100,7 +2101,9 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 287 "Scanner.l" +#line 288 "Scanner.l" +#include <IceUtil/PopDisableWarnings.h> + diff --git a/cpp/demo/Freeze/library/Scanner.l b/cpp/demo/Freeze/library/Scanner.l index 0b59c2f2341..9cdca19dd5b 100644 --- a/cpp/demo/Freeze/library/Scanner.l +++ b/cpp/demo/Freeze/library/Scanner.l @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -285,3 +286,5 @@ NL [\n] } %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/phonebook/Grammar.cpp b/cpp/demo/Freeze/phonebook/Grammar.cpp index fd892c9c2b3..90ab18e75b1 100644 --- a/cpp/demo/Freeze/phonebook/Grammar.cpp +++ b/cpp/demo/Freeze/phonebook/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,51 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_HELP = 258, - TOK_EXIT = 259, - TOK_ADD_CONTACTS = 260, - TOK_FIND_CONTACTS = 261, - TOK_NEXT_FOUND_CONTACT = 262, - TOK_PRINT_CURRENT = 263, - TOK_SET_CURRENT_NAME = 264, - TOK_SET_CURRENT_ADDRESS = 265, - TOK_SET_CURRENT_PHONE = 266, - TOK_REMOVE_CURRENT = 267, - TOK_SET_EVICTOR_SIZE = 268, - TOK_SHUTDOWN = 269, - TOK_STRING = 270 - }; -#endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_ADD_CONTACTS 260 -#define TOK_FIND_CONTACTS 261 -#define TOK_NEXT_FOUND_CONTACT 262 -#define TOK_PRINT_CURRENT 263 -#define TOK_SET_CURRENT_NAME 264 -#define TOK_SET_CURRENT_ADDRESS 265 -#define TOK_SET_CURRENT_PHONE 266 -#define TOK_REMOVE_CURRENT 267 -#define TOK_SET_EVICTOR_SIZE 268 -#define TOK_SHUTDOWN 269 -#define TOK_STRING 270 - +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -112,6 +80,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -139,6 +108,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 113 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -157,20 +129,44 @@ yyerror(const char* s) # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_HELP = 258, + TOK_EXIT = 259, + TOK_ADD_CONTACTS = 260, + TOK_FIND_CONTACTS = 261, + TOK_NEXT_FOUND_CONTACT = 262, + TOK_PRINT_CURRENT = 263, + TOK_SET_CURRENT_NAME = 264, + TOK_SET_CURRENT_ADDRESS = 265, + TOK_SET_CURRENT_PHONE = 266, + TOK_REMOVE_CURRENT = 267, + TOK_SET_EVICTOR_SIZE = 268, + TOK_SHUTDOWN = 269, + TOK_STRING = 270 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 174 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 170 "Grammar.tab.c" #ifdef short # undef short @@ -245,14 +241,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -333,9 +329,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -369,12 +365,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -461,9 +457,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 60, 60, 64, 71, 74, 82, 86, 90, 94, - 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, - 142, 147 + 0, 61, 61, 65, 72, 75, 83, 87, 91, 95, + 99, 103, 107, 111, 115, 119, 123, 127, 131, 135, + 143, 148 }; #endif @@ -761,17 +757,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -805,11 +804,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1089,10 +1088,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1111,10 +1108,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1138,74 +1134,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; + /* Number of syntax errors so far. */ + int yynerrs; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1235,7 +1232,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1243,7 +1239,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1266,9 +1261,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1279,7 +1273,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1289,6 +1282,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1297,16 +1293,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1338,20 +1334,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1391,128 +1383,166 @@ yyreduce: switch (yyn) { case 2: -#line 61 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 62 "Grammar.y" { ;} break; case 3: -#line 64 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 65 "Grammar.y" { ;} break; case 4: -#line 72 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 73 "Grammar.y" { ;} break; case 5: -#line 75 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 76 "Grammar.y" { ;} break; case 6: -#line 83 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 84 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 87 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 88 "Grammar.y" { return 0; ;} break; case 8: -#line 91 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 92 "Grammar.y" { parser->addContacts((yyvsp[(2) - (3)])); ;} break; case 9: -#line 95 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 96 "Grammar.y" { parser->findContacts((yyvsp[(2) - (3)])); ;} break; case 10: -#line 99 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 100 "Grammar.y" { parser->nextFoundContact(); ;} break; case 11: -#line 103 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 104 "Grammar.y" { parser->printCurrent(); ;} break; case 12: -#line 107 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 108 "Grammar.y" { parser->setCurrentName((yyvsp[(2) - (3)])); ;} break; case 13: -#line 111 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 112 "Grammar.y" { parser->setCurrentAddress((yyvsp[(2) - (3)])); ;} break; case 14: -#line 115 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 116 "Grammar.y" { parser->setCurrentPhone((yyvsp[(2) - (3)])); ;} break; case 15: -#line 119 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 120 "Grammar.y" { parser->removeCurrent(); ;} break; case 16: -#line 123 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 124 "Grammar.y" { parser->setEvictorSize((yyvsp[(2) - (3)])); ;} break; case 17: -#line 127 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 128 "Grammar.y" { parser->shutdown(); ;} break; case 18: -#line 131 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 132 "Grammar.y" { yyerrok; ;} break; case 19: -#line 135 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 136 "Grammar.y" { ;} break; case 20: -#line 143 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 144 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1520,15 +1550,18 @@ yyreduce: break; case 21: -#line 148 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 149 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); ;} break; -/* Line 1267 of yacc.c. */ -#line 1532 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1565 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1539,7 +1572,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1604,7 +1636,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1621,7 +1653,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1678,9 +1710,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1705,7 +1734,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1716,7 +1745,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1742,6 +1771,10 @@ yyreturn: } -#line 153 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 154 "Grammar.y" + + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/phonebook/Grammar.h b/cpp/demo/Freeze/phonebook/Grammar.h index 759d1869ca2..fb5de6918c2 100644 --- a/cpp/demo/Freeze/phonebook/Grammar.h +++ b/cpp/demo/Freeze/phonebook/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -54,30 +54,16 @@ TOK_STRING = 270 }; #endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_ADD_CONTACTS 260 -#define TOK_FIND_CONTACTS 261 -#define TOK_NEXT_FOUND_CONTACT 262 -#define TOK_PRINT_CURRENT 263 -#define TOK_SET_CURRENT_NAME 264 -#define TOK_SET_CURRENT_ADDRESS 265 -#define TOK_SET_CURRENT_PHONE 266 -#define TOK_REMOVE_CURRENT 267 -#define TOK_SET_EVICTOR_SIZE 268 -#define TOK_SHUTDOWN 269 -#define TOK_STRING 270 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/cpp/demo/Freeze/phonebook/Grammar.y b/cpp/demo/Freeze/phonebook/Grammar.y index ddcdc66c414..6ac01c68dd0 100644 --- a/cpp/demo/Freeze/phonebook/Grammar.y +++ b/cpp/demo/Freeze/phonebook/Grammar.y @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -151,3 +152,5 @@ strings ; %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/phonebook/Makefile b/cpp/demo/Freeze/phonebook/Makefile index e66958f2951..259b26965fe 100644 --- a/cpp/demo/Freeze/phonebook/Makefile +++ b/cpp/demo/Freeze/phonebook/Makefile @@ -1,4 +1,3 @@ - # ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. @@ -10,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server COLLOCATED = collocated diff --git a/cpp/demo/Freeze/phonebook/Makefile.mak b/cpp/demo/Freeze/phonebook/Makefile.mak index ba5d9acd7cc..1c53d5f5c72 100644 --- a/cpp/demo/Freeze/phonebook/Makefile.mak +++ b/cpp/demo/Freeze/phonebook/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe diff --git a/cpp/demo/Freeze/phonebook/PhoneBook.ice b/cpp/demo/Freeze/phonebook/PhoneBook.ice index 77930dbec48..c3653c586fc 100644 --- a/cpp/demo/Freeze/phonebook/PhoneBook.ice +++ b/cpp/demo/Freeze/phonebook/PhoneBook.ice @@ -22,13 +22,13 @@ exception DatabaseException class Contact { ["cpp:const"] idempotent string getName(); - ["freeze:write"] idempotent void setName(string name) throws DatabaseException; + ["freeze:write"] idempotent void setName(string nm) throws DatabaseException; ["cpp:const"] idempotent string getAddress(); - ["freeze:write"] idempotent void setAddress(string address); + ["freeze:write"] idempotent void setAddress(string addr); ["cpp:const"] idempotent string getPhone(); - ["freeze:write"] idempotent void setPhone(string phone); + ["freeze:write"] idempotent void setPhone(string pn); ["freeze:write"] void destroy() throws DatabaseException; diff --git a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp index 9034ea94bc5..f430bdd9db9 100644 --- a/cpp/demo/Freeze/phonebook/PhoneBookI.cpp +++ b/cpp/demo/Freeze/phonebook/PhoneBookI.cpp @@ -21,42 +21,42 @@ ContactI::ContactI(const ContactFactoryPtr& contactFactory) : string ContactI::getName(const Ice::Current&) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); return name; } void ContactI::setName(const string& newName, const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); name = newName; } string ContactI::getAddress(const Ice::Current&) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); return address; } void ContactI::setAddress(const string& newAddress, const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); address = newAddress; } string ContactI::getPhone(const Ice::Current&) const { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); return phone; } void ContactI::setPhone(const string& newPhone, const Ice::Current&) { - IceUtil::Mutex::Lock lock(*this); + IceUtil::Mutex::Lock lck(*this); phone = newPhone; } diff --git a/cpp/demo/Freeze/phonebook/Scanner.cpp b/cpp/demo/Freeze/phonebook/Scanner.cpp index 308b2a505ae..a5177d25cda 100644 --- a/cpp/demo/Freeze/phonebook/Scanner.cpp +++ b/cpp/demo/Freeze/phonebook/Scanner.cpp @@ -509,6 +509,7 @@ char *yytext; // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -553,7 +554,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 556 "lex.yy.c" +#line 557 "lex.yy.c" #define INITIAL 0 @@ -735,10 +736,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "Scanner.l" +#line 65 "Scanner.l" -#line 741 "lex.yy.c" +#line 742 "lex.yy.c" if ( !(yy_init) ) { @@ -823,7 +824,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 66 "Scanner.l" +#line 67 "Scanner.l" { // C++-style comment int c; @@ -836,7 +837,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 76 "Scanner.l" +#line 77 "Scanner.l" { // C-style comment while(true) @@ -864,84 +865,84 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 101 "Scanner.l" +#line 102 "Scanner.l" { return TOK_HELP; } YY_BREAK case 4: YY_RULE_SETUP -#line 105 "Scanner.l" +#line 106 "Scanner.l" { return TOK_EXIT; } YY_BREAK case 5: YY_RULE_SETUP -#line 109 "Scanner.l" +#line 110 "Scanner.l" { return TOK_ADD_CONTACTS; } YY_BREAK case 6: YY_RULE_SETUP -#line 113 "Scanner.l" +#line 114 "Scanner.l" { return TOK_FIND_CONTACTS; } YY_BREAK case 7: YY_RULE_SETUP -#line 117 "Scanner.l" +#line 118 "Scanner.l" { return TOK_NEXT_FOUND_CONTACT; } YY_BREAK case 8: YY_RULE_SETUP -#line 121 "Scanner.l" +#line 122 "Scanner.l" { return TOK_PRINT_CURRENT; } YY_BREAK case 9: YY_RULE_SETUP -#line 125 "Scanner.l" +#line 126 "Scanner.l" { return TOK_SET_CURRENT_NAME; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "Scanner.l" +#line 130 "Scanner.l" { return TOK_SET_CURRENT_ADDRESS; } YY_BREAK case 11: YY_RULE_SETUP -#line 133 "Scanner.l" +#line 134 "Scanner.l" { return TOK_SET_CURRENT_PHONE; } YY_BREAK case 12: YY_RULE_SETUP -#line 137 "Scanner.l" +#line 138 "Scanner.l" { return TOK_REMOVE_CURRENT; } YY_BREAK case 13: YY_RULE_SETUP -#line 141 "Scanner.l" +#line 142 "Scanner.l" { return TOK_SET_EVICTOR_SIZE; } YY_BREAK case 14: YY_RULE_SETUP -#line 145 "Scanner.l" +#line 146 "Scanner.l" { return TOK_SHUTDOWN; } @@ -949,7 +950,7 @@ YY_RULE_SETUP case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 149 "Scanner.l" +#line 150 "Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -964,14 +965,14 @@ YY_RULE_SETUP case 16: /* rule 16 can match eol */ YY_RULE_SETUP -#line 160 "Scanner.l" +#line 161 "Scanner.l" { return ';'; } YY_BREAK case 17: YY_RULE_SETUP -#line 164 "Scanner.l" +#line 165 "Scanner.l" { // "..."-type strings string s; @@ -1048,7 +1049,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 238 "Scanner.l" +#line 239 "Scanner.l" { // '...'-type strings string s; @@ -1076,7 +1077,7 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 263 "Scanner.l" +#line 264 "Scanner.l" { // Simple strings string s; @@ -1103,10 +1104,10 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -#line 287 "Scanner.l" +#line 288 "Scanner.l" ECHO; YY_BREAK -#line 1109 "lex.yy.c" +#line 1110 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2100,7 +2101,9 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 287 "Scanner.l" +#line 288 "Scanner.l" +#include <IceUtil/PopDisableWarnings.h> + diff --git a/cpp/demo/Freeze/phonebook/Scanner.l b/cpp/demo/Freeze/phonebook/Scanner.l index 810fddd819a..aa509b2e556 100644 --- a/cpp/demo/Freeze/phonebook/Scanner.l +++ b/cpp/demo/Freeze/phonebook/Scanner.l @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -285,3 +286,5 @@ NL [\n] } %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Freeze/transform/Makefile b/cpp/demo/Freeze/transform/Makefile index 6f2f7f5b48f..8054804234d 100644 --- a/cpp/demo/Freeze/transform/Makefile +++ b/cpp/demo/Freeze/transform/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CREATE = create READ = read READNEW = readnew diff --git a/cpp/demo/Freeze/transform/Makefile.mak b/cpp/demo/Freeze/transform/Makefile.mak index 201b25ea1ba..1ec80928fa0 100644 --- a/cpp/demo/Freeze/transform/Makefile.mak +++ b/cpp/demo/Freeze/transform/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CREATE = create.exe READ = read.exe READNEW = readnew.exe diff --git a/cpp/demo/Glacier2/callback/Client.cpp b/cpp/demo/Glacier2/callback/Client.cpp index bf8b39e504f..42bffc96bda 100644 --- a/cpp/demo/Glacier2/callback/Client.cpp +++ b/cpp/demo/Glacier2/callback/Client.cpp @@ -62,8 +62,8 @@ CallbackClient::CallbackClient() : Glacier2::SessionPrx CallbackClient::createSession() { - Glacier2::SessionPrx session; - while(!session) + Glacier2::SessionPrx sess; + while(!sess) { cout << "This demo accepts any user-id / password combination.\n"; @@ -77,7 +77,7 @@ CallbackClient::createSession() try { - session = router()->createSession(id, pw); + sess = router()->createSession(id, pw); break; } catch(const Glacier2::PermissionDeniedException& ex) @@ -89,7 +89,7 @@ CallbackClient::createSession() cout << "cannot create session:\n" << ex.reason << endl; } } - return session; + return sess; } int diff --git a/cpp/demo/Glacier2/callback/Makefile b/cpp/demo/Glacier2/callback/Makefile index b3263625a3b..3b6e382afd5 100644 --- a/cpp/demo/Glacier2/callback/Makefile +++ b/cpp/demo/Glacier2/callback/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Glacier2/callback/Makefile.mak b/cpp/demo/Glacier2/callback/Makefile.mak index 106affc6bd8..2861c25b6b3 100644 --- a/cpp/demo/Glacier2/callback/Makefile.mak +++ b/cpp/demo/Glacier2/callback/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Glacier2/chat/Client.cpp b/cpp/demo/Glacier2/chat/Client.cpp index 91e65fbe6df..e18e71c841f 100644 --- a/cpp/demo/Glacier2/chat/Client.cpp +++ b/cpp/demo/Glacier2/chat/Client.cpp @@ -54,8 +54,8 @@ public: virtual Glacier2::SessionPrx createSession() { - ChatSessionPrx session; - while(!session) + ChatSessionPrx sess; + while(!sess) { cout << "This demo accepts any user-id / password combination.\n"; @@ -71,7 +71,7 @@ public: try { - session = ChatSessionPrx::uncheckedCast(router()->createSession(id, pw)); + sess = ChatSessionPrx::uncheckedCast(router()->createSession(id, pw)); break; } catch(const Glacier2::PermissionDeniedException& ex) @@ -83,7 +83,7 @@ public: cout << "cannot create session:\n" << ex.reason << endl; } } - return session; + return sess; } virtual int diff --git a/cpp/demo/Glacier2/chat/Makefile b/cpp/demo/Glacier2/chat/Makefile index e18e24c07c1..6e8c796ef41 100644 --- a/cpp/demo/Glacier2/chat/Makefile +++ b/cpp/demo/Glacier2/chat/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Glacier2/chat/Makefile.mak b/cpp/demo/Glacier2/chat/Makefile.mak index 7bd78e5bbd0..adf0aa4388e 100644 --- a/cpp/demo/Glacier2/chat/Makefile.mak +++ b/cpp/demo/Glacier2/chat/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/MFC/client/Makefile.mak b/cpp/demo/Ice/MFC/client/Makefile.mak index d194eab6e65..5d264186ac2 100755 --- a/cpp/demo/Ice/MFC/client/Makefile.mak +++ b/cpp/demo/Ice/MFC/client/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe TARGETS = $(CLIENT) diff --git a/cpp/demo/Ice/MFC/server/Makefile.mak b/cpp/demo/Ice/MFC/server/Makefile.mak index ba87b754ecb..4858367ed35 100644 --- a/cpp/demo/Ice/MFC/server/Makefile.mak +++ b/cpp/demo/Ice/MFC/server/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + SERVER = server.exe TARGETS = $(SERVER) diff --git a/cpp/demo/Ice/async/Makefile b/cpp/demo/Ice/async/Makefile index c109688a9fc..6edba9588bc 100644 --- a/cpp/demo/Ice/async/Makefile +++ b/cpp/demo/Ice/async/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/async/Makefile.mak b/cpp/demo/Ice/async/Makefile.mak index 4b85418afd1..a9f24b4a568 100644 --- a/cpp/demo/Ice/async/Makefile.mak +++ b/cpp/demo/Ice/async/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/bidir/CallbackI.cpp b/cpp/demo/Ice/bidir/CallbackI.cpp index eaaf0046f18..b7ede212e89 100644 --- a/cpp/demo/Ice/bidir/CallbackI.cpp +++ b/cpp/demo/Ice/bidir/CallbackI.cpp @@ -23,7 +23,7 @@ void CallbackSenderI::destroy() { { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); + IceUtil::Monitor<IceUtil::Mutex>::Lock lck(*this); cout << "destroying callback sender" << endl; _destroy = true; @@ -37,7 +37,7 @@ CallbackSenderI::destroy() void CallbackSenderI::addClient(const Identity& ident, const Current& current) { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); + IceUtil::Monitor<IceUtil::Mutex>::Lock lck(*this); cout << "adding client `" << _communicator->identityToString(ident) << "'"<< endl; @@ -49,17 +49,17 @@ void CallbackSenderI::run() { int num = 0; - bool destroy = false; - while(!destroy) + bool destroyed = false; + while(!destroyed) { std::set<Demo::CallbackReceiverPrx> clients; { - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); + IceUtil::Monitor<IceUtil::Mutex>::Lock lck(*this); timedWait(IceUtil::Time::seconds(2)); if(_destroy) { - destroy = true; + destroyed = true; continue; } @@ -80,7 +80,7 @@ CallbackSenderI::run() cerr << "removing client `" << _communicator->identityToString((*p)->ice_getIdentity()) << "':\n" << ex << endl; - IceUtil::Monitor<IceUtil::Mutex>::Lock lock(*this); + IceUtil::Monitor<IceUtil::Mutex>::Lock lck(*this); _clients.erase(*p); } } diff --git a/cpp/demo/Ice/bidir/Makefile b/cpp/demo/Ice/bidir/Makefile index 419eab93f86..db44f8ad5b2 100644 --- a/cpp/demo/Ice/bidir/Makefile +++ b/cpp/demo/Ice/bidir/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/bidir/Makefile.mak b/cpp/demo/Ice/bidir/Makefile.mak index da6f8b3d193..93d7cc84621 100644 --- a/cpp/demo/Ice/bidir/Makefile.mak +++ b/cpp/demo/Ice/bidir/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/callback/Makefile b/cpp/demo/Ice/callback/Makefile index 752155b2d7f..ae2d1a27d62 100644 --- a/cpp/demo/Ice/callback/Makefile +++ b/cpp/demo/Ice/callback/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/callback/Makefile.mak b/cpp/demo/Ice/callback/Makefile.mak index c0ecc7598e9..1d6336992ca 100644 --- a/cpp/demo/Ice/callback/Makefile.mak +++ b/cpp/demo/Ice/callback/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/context/Makefile b/cpp/demo/Ice/context/Makefile index c1ce240575c..433bbfc38a8 100644 --- a/cpp/demo/Ice/context/Makefile +++ b/cpp/demo/Ice/context/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/context/Makefile.mak b/cpp/demo/Ice/context/Makefile.mak index ffdfb2d39fd..872705f875e 100644 --- a/cpp/demo/Ice/context/Makefile.mak +++ b/cpp/demo/Ice/context/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/converter/Makefile b/cpp/demo/Ice/converter/Makefile index 3bd0c75a622..91b57445587 100644 --- a/cpp/demo/Ice/converter/Makefile +++ b/cpp/demo/Ice/converter/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT1 = client1 CLIENT2 = client2 SERVER = server diff --git a/cpp/demo/Ice/converter/Makefile.mak b/cpp/demo/Ice/converter/Makefile.mak index 3d8e1d4cb0e..bf5928df545 100644 --- a/cpp/demo/Ice/converter/Makefile.mak +++ b/cpp/demo/Ice/converter/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT1 = client1.exe CLIENT2 = client2.exe SERVER = server.exe diff --git a/cpp/demo/Ice/hello/Makefile b/cpp/demo/Ice/hello/Makefile index cd24cde992c..1894d1f32f5 100644 --- a/cpp/demo/Ice/hello/Makefile +++ b/cpp/demo/Ice/hello/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/hello/Makefile.mak b/cpp/demo/Ice/hello/Makefile.mak index 9846f98bc23..259b701b0f0 100644 --- a/cpp/demo/Ice/hello/Makefile.mak +++ b/cpp/demo/Ice/hello/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/interleaved/Client.cpp b/cpp/demo/Ice/interleaved/Client.cpp index 066860e6846..dca8b99f3d8 100644 --- a/cpp/demo/Ice/interleaved/Client.cpp +++ b/cpp/demo/Ice/interleaved/Client.cpp @@ -103,15 +103,14 @@ ThroughputClient::run(int argc, char* argv[]) StringSeq stringSeq(StringSeqSize, "hello"); StringDoubleSeq structSeq(StringDoubleSeqSize); - int i; - for(i = 0; i < StringDoubleSeqSize; ++i) + for(int i = 0; i < StringDoubleSeqSize; ++i) { structSeq[i].s = "hello"; structSeq[i].d = 3.14; } FixedSeq fixedSeq(FixedSeqSize); - for(i = 0; i < FixedSeqSize; ++i) + for(int i = 0; i < FixedSeqSize; ++i) { fixedSeq[i].i = 0; fixedSeq[i].j = 0; diff --git a/cpp/demo/Ice/interleaved/Makefile b/cpp/demo/Ice/interleaved/Makefile index 836ad5fd70c..bb04260a6ef 100755 --- a/cpp/demo/Ice/interleaved/Makefile +++ b/cpp/demo/Ice/interleaved/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/interleaved/Makefile.mak b/cpp/demo/Ice/interleaved/Makefile.mak index e500d94e453..5ee2da211aa 100644 --- a/cpp/demo/Ice/interleaved/Makefile.mak +++ b/cpp/demo/Ice/interleaved/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/invoke/Makefile b/cpp/demo/Ice/invoke/Makefile index 80a94faf9f7..077b484ca78 100644 --- a/cpp/demo/Ice/invoke/Makefile +++ b/cpp/demo/Ice/invoke/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/invoke/Makefile.mak b/cpp/demo/Ice/invoke/Makefile.mak index ab658899c19..eee59b4917a 100644 --- a/cpp/demo/Ice/invoke/Makefile.mak +++ b/cpp/demo/Ice/invoke/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/latency/Makefile b/cpp/demo/Ice/latency/Makefile index bf3957efd42..fdf083bf001 100644 --- a/cpp/demo/Ice/latency/Makefile +++ b/cpp/demo/Ice/latency/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/latency/Makefile.mak b/cpp/demo/Ice/latency/Makefile.mak index 3a5eb927678..183039649ad 100644 --- a/cpp/demo/Ice/latency/Makefile.mak +++ b/cpp/demo/Ice/latency/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/minimal/Client.cpp b/cpp/demo/Ice/minimal/Client.cpp index cdc5d07205e..0c1968c30b2 100644 --- a/cpp/demo/Ice/minimal/Client.cpp +++ b/cpp/demo/Ice/minimal/Client.cpp @@ -25,9 +25,9 @@ main(int argc, char* argv[]) hello->sayHello(); communicator->destroy(); } - catch(const Ice::Exception& ex) + catch(const Ice::Exception& ex1) { - cerr << ex << endl; + cerr << ex1 << endl; try { if(communicator) @@ -35,9 +35,9 @@ main(int argc, char* argv[]) communicator->destroy(); } } - catch(const Ice::Exception& ex) + catch(const Ice::Exception& ex2) { - cerr << ex << endl; + cerr << ex2 << endl; } exit(1); } diff --git a/cpp/demo/Ice/minimal/Makefile b/cpp/demo/Ice/minimal/Makefile index cd24cde992c..2c0e805c99a 100644 --- a/cpp/demo/Ice/minimal/Makefile +++ b/cpp/demo/Ice/minimal/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/minimal/Makefile.mak b/cpp/demo/Ice/minimal/Makefile.mak index e4c06be0a82..16f9bce1899 100644 --- a/cpp/demo/Ice/minimal/Makefile.mak +++ b/cpp/demo/Ice/minimal/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/minimal/Server.cpp b/cpp/demo/Ice/minimal/Server.cpp index 9866b8565be..bed7dc01f0b 100644 --- a/cpp/demo/Ice/minimal/Server.cpp +++ b/cpp/demo/Ice/minimal/Server.cpp @@ -36,9 +36,9 @@ main(int argc, char* argv[]) { communicator->destroy(); } - catch(const Ice::Exception& ex) + catch(const Ice::Exception& ex2) { - cerr << ex << endl; + cerr << ex2 << endl; } } exit(1); diff --git a/cpp/demo/Ice/multicast/Makefile b/cpp/demo/Ice/multicast/Makefile index 37df549aadc..6ad8aa5dac3 100644 --- a/cpp/demo/Ice/multicast/Makefile +++ b/cpp/demo/Ice/multicast/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/multicast/Makefile.mak b/cpp/demo/Ice/multicast/Makefile.mak index 161523bd5e4..bfbd3b01c96 100644 --- a/cpp/demo/Ice/multicast/Makefile.mak +++ b/cpp/demo/Ice/multicast/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/nested/Makefile b/cpp/demo/Ice/nested/Makefile index 79876af575c..f3455dd3619 100644 --- a/cpp/demo/Ice/nested/Makefile +++ b/cpp/demo/Ice/nested/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/nested/Makefile.mak b/cpp/demo/Ice/nested/Makefile.mak index ee5d182630f..5ecc41cbeed 100644 --- a/cpp/demo/Ice/nested/Makefile.mak +++ b/cpp/demo/Ice/nested/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/nrvo/Makefile b/cpp/demo/Ice/nrvo/Makefile index da169cc50c5..00deed1ab42 100644 --- a/cpp/demo/Ice/nrvo/Makefile +++ b/cpp/demo/Ice/nrvo/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/nrvo/Makefile.mak b/cpp/demo/Ice/nrvo/Makefile.mak index 0a074bffbb4..22a1493c13e 100644 --- a/cpp/demo/Ice/nrvo/Makefile.mak +++ b/cpp/demo/Ice/nrvo/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/optional/Makefile b/cpp/demo/Ice/optional/Makefile index e67c3f095fe..dae1c162e22 100644 --- a/cpp/demo/Ice/optional/Makefile +++ b/cpp/demo/Ice/optional/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/optional/Makefile.mak b/cpp/demo/Ice/optional/Makefile.mak index a149f626ede..55360b4651d 100644 --- a/cpp/demo/Ice/optional/Makefile.mak +++ b/cpp/demo/Ice/optional/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/plugin/Makefile b/cpp/demo/Ice/plugin/Makefile index b239a743204..f947b4e2332 100644 --- a/cpp/demo/Ice/plugin/Makefile +++ b/cpp/demo/Ice/plugin/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/plugin/Makefile.mak b/cpp/demo/Ice/plugin/Makefile.mak index 324be513744..911f6d24571 100644 --- a/cpp/demo/Ice/plugin/Makefile.mak +++ b/cpp/demo/Ice/plugin/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/properties/Makefile b/cpp/demo/Ice/properties/Makefile index 34adf0b83ea..8874a919c78 100644 --- a/cpp/demo/Ice/properties/Makefile +++ b/cpp/demo/Ice/properties/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/properties/Makefile.mak b/cpp/demo/Ice/properties/Makefile.mak index c8b435a38c5..9a0c0f26a03 100644 --- a/cpp/demo/Ice/properties/Makefile.mak +++ b/cpp/demo/Ice/properties/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/session/Makefile b/cpp/demo/Ice/session/Makefile index 8dd1f78722f..3b187ea5e9f 100644 --- a/cpp/demo/Ice/session/Makefile +++ b/cpp/demo/Ice/session/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/session/Makefile.mak b/cpp/demo/Ice/session/Makefile.mak index bae70694791..08184712d74 100644 --- a/cpp/demo/Ice/session/Makefile.mak +++ b/cpp/demo/Ice/session/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/throughput/Client.cpp b/cpp/demo/Ice/throughput/Client.cpp index 8aba2229d0c..dff155d2b88 100644 --- a/cpp/demo/Ice/throughput/Client.cpp +++ b/cpp/demo/Ice/throughput/Client.cpp @@ -70,15 +70,14 @@ ThroughputClient::run(int argc, char* argv[]) vector<Util::string_view> stringViewSeq(StringSeqSize, "hello"); StringDoubleSeq structSeq(StringDoubleSeqSize); - int i; - for(i = 0; i < StringDoubleSeqSize; ++i) + for(int i = 0; i < StringDoubleSeqSize; ++i) { structSeq[i].s = "hello"; structSeq[i].d = 3.14; } FixedSeq fixedSeq(FixedSeqSize); - for(i = 0; i < FixedSeqSize; ++i) + for(int i = 0; i < FixedSeqSize; ++i) { fixedSeq[i].i = 0; fixedSeq[i].j = 0; diff --git a/cpp/demo/Ice/throughput/Makefile b/cpp/demo/Ice/throughput/Makefile index b895b064cd6..b7c8764dcad 100644 --- a/cpp/demo/Ice/throughput/Makefile +++ b/cpp/demo/Ice/throughput/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/throughput/Makefile.mak b/cpp/demo/Ice/throughput/Makefile.mak index e500d94e453..5ee2da211aa 100644 --- a/cpp/demo/Ice/throughput/Makefile.mak +++ b/cpp/demo/Ice/throughput/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Ice/value/Makefile b/cpp/demo/Ice/value/Makefile index 405b37904f8..e7b7f076681 100644 --- a/cpp/demo/Ice/value/Makefile +++ b/cpp/demo/Ice/value/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Ice/value/Makefile.mak b/cpp/demo/Ice/value/Makefile.mak index 43e63b6cccc..ff0d1ed449b 100644 --- a/cpp/demo/Ice/value/Makefile.mak +++ b/cpp/demo/Ice/value/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceBox/hello/Makefile b/cpp/demo/IceBox/hello/Makefile index daea628c092..608838eca48 100644 --- a/cpp/demo/IceBox/hello/Makefile +++ b/cpp/demo/IceBox/hello/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client LIBFILENAME = $(call mklibfilename,HelloService) diff --git a/cpp/demo/IceBox/hello/Makefile.mak b/cpp/demo/IceBox/hello/Makefile.mak index 6dd0f5cc6b4..f3ef8289f7e 100644 --- a/cpp/demo/IceBox/hello/Makefile.mak +++ b/cpp/demo/IceBox/hello/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe LIBNAME = helloservice$(LIBSUFFIX).lib diff --git a/cpp/demo/IceDiscovery/hello/Makefile b/cpp/demo/IceDiscovery/hello/Makefile index cd24cde992c..2c0e805c99a 100644 --- a/cpp/demo/IceDiscovery/hello/Makefile +++ b/cpp/demo/IceDiscovery/hello/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceDiscovery/hello/Makefile.mak b/cpp/demo/IceDiscovery/hello/Makefile.mak index e4c06be0a82..16f9bce1899 100644 --- a/cpp/demo/IceDiscovery/hello/Makefile.mak +++ b/cpp/demo/IceDiscovery/hello/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceDiscovery/replication/Makefile b/cpp/demo/IceDiscovery/replication/Makefile index af622659b8c..a3aeece8ebe 100644 --- a/cpp/demo/IceDiscovery/replication/Makefile +++ b/cpp/demo/IceDiscovery/replication/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceDiscovery/replication/Makefile.mak b/cpp/demo/IceDiscovery/replication/Makefile.mak index 37ab3ca6be1..5a51bf6ddd8 100644 --- a/cpp/demo/IceDiscovery/replication/Makefile.mak +++ b/cpp/demo/IceDiscovery/replication/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/allocate/Makefile b/cpp/demo/IceGrid/allocate/Makefile index 7101181f20b..931d7cca715 100644 --- a/cpp/demo/IceGrid/allocate/Makefile +++ b/cpp/demo/IceGrid/allocate/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/allocate/Makefile.mak b/cpp/demo/IceGrid/allocate/Makefile.mak index 410347ccf3a..9cd2dc5810c 100644 --- a/cpp/demo/IceGrid/allocate/Makefile.mak +++ b/cpp/demo/IceGrid/allocate/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/customLoadBalancing/Makefile b/cpp/demo/IceGrid/customLoadBalancing/Makefile index a2a791cd4c6..8e8b863efb0 100644 --- a/cpp/demo/IceGrid/customLoadBalancing/Makefile +++ b/cpp/demo/IceGrid/customLoadBalancing/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/customLoadBalancing/Makefile.mak b/cpp/demo/IceGrid/customLoadBalancing/Makefile.mak index f196829d7c4..aab9f175a20 100644 --- a/cpp/demo/IceGrid/customLoadBalancing/Makefile.mak +++ b/cpp/demo/IceGrid/customLoadBalancing/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/customLoadBalancing/RegistryPlugin.cpp b/cpp/demo/IceGrid/customLoadBalancing/RegistryPlugin.cpp index 9dc5e7557af..c902a9a3109 100644 --- a/cpp/demo/IceGrid/customLoadBalancing/RegistryPlugin.cpp +++ b/cpp/demo/IceGrid/customLoadBalancing/RegistryPlugin.cpp @@ -104,11 +104,11 @@ ReplicaGroupFilterI::filter(const string& /* replicaGroupId */, // context. // Ice::StringSeq filteredAdapters; - for(Ice::StringSeq::const_iterator p = adapters.begin(); p != adapters.end(); ++p) + for(Ice::StringSeq::const_iterator q = adapters.begin(); q != adapters.end(); ++q) { - if(_facade->getPropertyForAdapter(*p, "Currencies").find(currency) != string::npos) + if(_facade->getPropertyForAdapter(*q, "Currencies").find(currency) != string::npos) { - filteredAdapters.push_back(*p); + filteredAdapters.push_back(*q); } } return filteredAdapters; diff --git a/cpp/demo/IceGrid/icebox/Makefile b/cpp/demo/IceGrid/icebox/Makefile index 5f2b87e4bc6..7e43a3abd38 100644 --- a/cpp/demo/IceGrid/icebox/Makefile +++ b/cpp/demo/IceGrid/icebox/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client LIBFILENAME = $(call mklibfilename,HelloService) diff --git a/cpp/demo/IceGrid/icebox/Makefile.mak b/cpp/demo/IceGrid/icebox/Makefile.mak index 8c19cb71e9e..07f751830f9 100644 --- a/cpp/demo/IceGrid/icebox/Makefile.mak +++ b/cpp/demo/IceGrid/icebox/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe LIBNAME = helloservice$(LIBSUFFIX).lib diff --git a/cpp/demo/IceGrid/replication/Makefile b/cpp/demo/IceGrid/replication/Makefile index 9a56278c70c..da3048ca78a 100644 --- a/cpp/demo/IceGrid/replication/Makefile +++ b/cpp/demo/IceGrid/replication/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/replication/Makefile.mak b/cpp/demo/IceGrid/replication/Makefile.mak index 179aaad52a1..8c1ab210a97 100644 --- a/cpp/demo/IceGrid/replication/Makefile.mak +++ b/cpp/demo/IceGrid/replication/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/secure/Makefile b/cpp/demo/IceGrid/secure/Makefile index 9063d2b1f9d..11a5438c6b7 100644 --- a/cpp/demo/IceGrid/secure/Makefile +++ b/cpp/demo/IceGrid/secure/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/secure/Makefile.mak b/cpp/demo/IceGrid/secure/Makefile.mak index d9514707dd4..3704f30216e 100644 --- a/cpp/demo/IceGrid/secure/Makefile.mak +++ b/cpp/demo/IceGrid/secure/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/sessionActivation/Makefile b/cpp/demo/IceGrid/sessionActivation/Makefile index 7101181f20b..931d7cca715 100644 --- a/cpp/demo/IceGrid/sessionActivation/Makefile +++ b/cpp/demo/IceGrid/sessionActivation/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/sessionActivation/Makefile.mak b/cpp/demo/IceGrid/sessionActivation/Makefile.mak index f887b10d568..06f5f7ac512 100644 --- a/cpp/demo/IceGrid/sessionActivation/Makefile.mak +++ b/cpp/demo/IceGrid/sessionActivation/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceGrid/simple/Makefile b/cpp/demo/IceGrid/simple/Makefile index 7101181f20b..931d7cca715 100644 --- a/cpp/demo/IceGrid/simple/Makefile +++ b/cpp/demo/IceGrid/simple/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceGrid/simple/Makefile.mak b/cpp/demo/IceGrid/simple/Makefile.mak index 410347ccf3a..9cd2dc5810c 100644 --- a/cpp/demo/IceGrid/simple/Makefile.mak +++ b/cpp/demo/IceGrid/simple/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IcePatch2/MFC/Makefile.mak b/cpp/demo/IcePatch2/MFC/Makefile.mak index c099e2e14f8..be7f4fa78bb 100644 --- a/cpp/demo/IcePatch2/MFC/Makefile.mak +++ b/cpp/demo/IcePatch2/MFC/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe TARGETS = $(CLIENT) diff --git a/cpp/demo/IceStorm/clock/Makefile b/cpp/demo/IceStorm/clock/Makefile index eaabd5f64e1..091b88a04f8 100644 --- a/cpp/demo/IceStorm/clock/Makefile +++ b/cpp/demo/IceStorm/clock/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + PUBLISHER = publisher SUBSCRIBER = subscriber diff --git a/cpp/demo/IceStorm/clock/Makefile.mak b/cpp/demo/IceStorm/clock/Makefile.mak index 3f6aaa53148..e2cde048973 100644 --- a/cpp/demo/IceStorm/clock/Makefile.mak +++ b/cpp/demo/IceStorm/clock/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + PUBLISHER = publisher.exe SUBSCRIBER = subscriber.exe diff --git a/cpp/demo/IceStorm/counter/Makefile b/cpp/demo/IceStorm/counter/Makefile index 67027aacb0e..afc099f37a0 100644 --- a/cpp/demo/IceStorm/counter/Makefile +++ b/cpp/demo/IceStorm/counter/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/IceStorm/counter/Makefile.mak b/cpp/demo/IceStorm/counter/Makefile.mak index b283acd3065..381b581768a 100644 --- a/cpp/demo/IceStorm/counter/Makefile.mak +++ b/cpp/demo/IceStorm/counter/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/IceStorm/replicated/Makefile b/cpp/demo/IceStorm/replicated/Makefile index 3659bead016..464750fd9ba 100644 --- a/cpp/demo/IceStorm/replicated/Makefile +++ b/cpp/demo/IceStorm/replicated/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + PUBLISHER = publisher SUBSCRIBER = subscriber diff --git a/cpp/demo/IceStorm/replicated/Makefile.mak b/cpp/demo/IceStorm/replicated/Makefile.mak index 533e02c539a..be885744b7f 100644 --- a/cpp/demo/IceStorm/replicated/Makefile.mak +++ b/cpp/demo/IceStorm/replicated/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + PUBLISHER = publisher.exe SUBSCRIBER = subscriber.exe diff --git a/cpp/demo/IceStorm/replicated2/Makefile b/cpp/demo/IceStorm/replicated2/Makefile index 557fb18723f..58623bbfb13 100644 --- a/cpp/demo/IceStorm/replicated2/Makefile +++ b/cpp/demo/IceStorm/replicated2/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + PUBLISHER = publisher SUBSCRIBER = subscriber diff --git a/cpp/demo/IceStorm/replicated2/Makefile.mak b/cpp/demo/IceStorm/replicated2/Makefile.mak index 20b578355cb..22f416acc0e 100644 --- a/cpp/demo/IceStorm/replicated2/Makefile.mak +++ b/cpp/demo/IceStorm/replicated2/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + PUBLISHER = publisher.exe SUBSCRIBER = subscriber.exe diff --git a/cpp/demo/IceUtil/workqueue/Makefile b/cpp/demo/IceUtil/workqueue/Makefile index 714adcf6e78..e70b4255802 100644 --- a/cpp/demo/IceUtil/workqueue/Makefile +++ b/cpp/demo/IceUtil/workqueue/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = workqueue TARGETS = $(CLIENT) diff --git a/cpp/demo/IceUtil/workqueue/Makefile.mak b/cpp/demo/IceUtil/workqueue/Makefile.mak index 43fb33e0665..ea4de08c41f 100644 --- a/cpp/demo/IceUtil/workqueue/Makefile.mak +++ b/cpp/demo/IceUtil/workqueue/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = workqueue.exe TARGETS = $(CLIENT) diff --git a/cpp/demo/Makefile.mak b/cpp/demo/Makefile.mak index 8876894bfa9..47ff46b22e9 100644 --- a/cpp/demo/Makefile.mak +++ b/cpp/demo/Makefile.mak @@ -26,11 +26,7 @@ SUBDIRS = $(SUBDIRS) \ IcePatch2 !endif -!if "$(ice_git_dist)" != "" -MAXWARN = MAXWARN=yes -!endif - $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" && \ - cmd /c "cd %i && $(MAKE) $(MAXWARN) -nologo -f Makefile.mak $@" || exit 1 + cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $@" || exit 1 diff --git a/cpp/demo/Manual/evictor_filesystem/Filesystem.ice b/cpp/demo/Manual/evictor_filesystem/Filesystem.ice index a57cf3c7d33..8d8f2550d0b 100644 --- a/cpp/demo/Manual/evictor_filesystem/Filesystem.ice +++ b/cpp/demo/Manual/evictor_filesystem/Filesystem.ice @@ -50,12 +50,12 @@ module Filesystem { idempotent NodeDescSeq list(); - idempotent NodeDesc find(string name) throws NoSuchName; + idempotent NodeDesc find(string nm) throws NoSuchName; ["freeze:write"] - File* createFile(string name) throws NameInUse; + File* createFile(string nm) throws NameInUse; ["freeze:write"] - Directory* createDirectory(string name) throws NameInUse; + Directory* createDirectory(string nm) throws NameInUse; }; }; diff --git a/cpp/demo/Manual/evictor_filesystem/Grammar.cpp b/cpp/demo/Manual/evictor_filesystem/Grammar.cpp index b65090aaa38..3fed0da3e14 100644 --- a/cpp/demo/Manual/evictor_filesystem/Grammar.cpp +++ b/cpp/demo/Manual/evictor_filesystem/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,49 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_HELP = 258, - TOK_EXIT = 259, - TOK_STRING = 260, - TOK_LIST = 261, - TOK_LIST_RECURSIVE = 262, - TOK_CREATE_FILE = 263, - TOK_CREATE_DIR = 264, - TOK_PWD = 265, - TOK_CD = 266, - TOK_CAT = 267, - TOK_WRITE = 268, - TOK_RM = 269 - }; -#endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 +/* Pull parsers. */ +#define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -110,6 +80,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -136,6 +107,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 112 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -154,20 +128,43 @@ yyerror(const char* s) # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_HELP = 258, + TOK_EXIT = 259, + TOK_STRING = 260, + TOK_LIST = 261, + TOK_LIST_RECURSIVE = 262, + TOK_CREATE_FILE = 263, + TOK_CREATE_DIR = 264, + TOK_PWD = 265, + TOK_CD = 266, + TOK_CAT = 267, + TOK_WRITE = 268, + TOK_RM = 269 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 171 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 168 "Grammar.tab.c" #ifdef short # undef short @@ -242,14 +239,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -330,9 +327,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -366,12 +363,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -456,9 +453,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 58, 58, 62, 69, 72, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, 128, 133, - 141, 146 + 0, 59, 59, 63, 70, 73, 81, 85, 89, 93, + 97, 101, 105, 109, 113, 117, 121, 125, 129, 134, + 142, 147 }; #endif @@ -746,17 +743,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -790,11 +790,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1074,10 +1074,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1096,10 +1094,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1123,74 +1120,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* Number of syntax errors so far. */ + int yynerrs; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1220,7 +1218,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1228,7 +1225,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1251,9 +1247,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1264,7 +1259,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1274,6 +1268,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1282,16 +1279,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1323,20 +1320,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1376,115 +1369,149 @@ yyreduce: switch (yyn) { case 2: -#line 59 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 60 "Grammar.y" { ;} break; case 3: -#line 62 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 63 "Grammar.y" { ;} break; case 4: -#line 70 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 71 "Grammar.y" { ;} break; case 5: -#line 73 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 74 "Grammar.y" { ;} break; case 6: -#line 81 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 82 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 85 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 86 "Grammar.y" { return 0; ;} break; case 8: -#line 89 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 90 "Grammar.y" { parser->list(false); ;} break; case 9: -#line 93 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 94 "Grammar.y" { parser->list(true); ;} break; case 10: -#line 97 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 98 "Grammar.y" { parser->createFile((yyvsp[(2) - (2)])); ;} break; case 11: -#line 101 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 102 "Grammar.y" { parser->createDir((yyvsp[(2) - (2)])); ;} break; case 12: -#line 105 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 106 "Grammar.y" { parser->pwd(); ;} break; case 13: -#line 109 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 110 "Grammar.y" { parser->cd("/"); ;} break; case 14: -#line 113 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 114 "Grammar.y" { parser->cd((yyvsp[(2) - (2)]).front()); ;} break; case 15: -#line 117 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 118 "Grammar.y" { parser->cat((yyvsp[(2) - (2)]).front()); ;} break; case 16: -#line 121 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 122 "Grammar.y" { parser->write((yyvsp[(2) - (2)])); ;} break; case 17: -#line 125 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 126 "Grammar.y" { parser->destroy((yyvsp[(2) - (2)])); ;} break; case 18: -#line 129 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 130 "Grammar.y" { parser->usage(); yyerrok; @@ -1492,13 +1519,17 @@ yyreduce: break; case 19: -#line 134 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 135 "Grammar.y" { ;} break; case 20: -#line 142 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 143 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1506,15 +1537,18 @@ yyreduce: break; case 21: -#line 147 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 148 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); ;} break; -/* Line 1267 of yacc.c. */ -#line 1518 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1552 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1525,7 +1559,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1590,7 +1623,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1607,7 +1640,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1664,9 +1697,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1691,7 +1721,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1702,7 +1732,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1728,6 +1758,10 @@ yyreturn: } -#line 152 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 153 "Grammar.y" + + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/evictor_filesystem/Grammar.h b/cpp/demo/Manual/evictor_filesystem/Grammar.h index b5b8e41ade4..ca5a99150f6 100644 --- a/cpp/demo/Manual/evictor_filesystem/Grammar.h +++ b/cpp/demo/Manual/evictor_filesystem/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -53,29 +53,16 @@ TOK_RM = 269 }; #endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/cpp/demo/Manual/evictor_filesystem/Grammar.y b/cpp/demo/Manual/evictor_filesystem/Grammar.y index 7c3cb792f11..9e17eb2a8e7 100644 --- a/cpp/demo/Manual/evictor_filesystem/Grammar.y +++ b/cpp/demo/Manual/evictor_filesystem/Grammar.y @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -150,3 +151,5 @@ strings ; %% + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/evictor_filesystem/Makefile b/cpp/demo/Manual/evictor_filesystem/Makefile index 9aa46a5bb1d..fefd343d261 100644 --- a/cpp/demo/Manual/evictor_filesystem/Makefile +++ b/cpp/demo/Manual/evictor_filesystem/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Manual/evictor_filesystem/Makefile.mak b/cpp/demo/Manual/evictor_filesystem/Makefile.mak index 8c826858b4f..fbc2bfa9e70 100644 --- a/cpp/demo/Manual/evictor_filesystem/Makefile.mak +++ b/cpp/demo/Manual/evictor_filesystem/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Manual/evictor_filesystem/PersistentFilesystem.ice b/cpp/demo/Manual/evictor_filesystem/PersistentFilesystem.ice index de4a674a51a..16460b3080f 100644 --- a/cpp/demo/Manual/evictor_filesystem/PersistentFilesystem.ice +++ b/cpp/demo/Manual/evictor_filesystem/PersistentFilesystem.ice @@ -29,7 +29,7 @@ module Filesystem class PersistentDirectory extends PersistentNode implements Directory { ["freeze:write"] - void removeNode(string name); + void removeNode(string nm); NodeDict nodes; }; diff --git a/cpp/demo/Manual/evictor_filesystem/PersistentFilesystemI.cpp b/cpp/demo/Manual/evictor_filesystem/PersistentFilesystemI.cpp index 67544dcf2b1..6bdc3fc588e 100644 --- a/cpp/demo/Manual/evictor_filesystem/PersistentFilesystemI.cpp +++ b/cpp/demo/Manual/evictor_filesystem/PersistentFilesystemI.cpp @@ -68,7 +68,7 @@ Filesystem::FileI::read(const Ice::Current& c) } void -Filesystem::FileI::write(const Filesystem::Lines& text, const Ice::Current& c) +Filesystem::FileI::write(const Filesystem::Lines& txt, const Ice::Current& c) { IceUtil::Mutex::Lock lock(_mutex); @@ -77,7 +77,7 @@ Filesystem::FileI::write(const Filesystem::Lines& text, const Ice::Current& c) throw Ice::ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - this->text = text; + this->text = txt; } // @@ -152,7 +152,7 @@ Filesystem::DirectoryI::list(const Ice::Current& c) } Filesystem::NodeDesc -Filesystem::DirectoryI::find(const string& name, const Ice::Current& c) +Filesystem::DirectoryI::find(const string& nm, const Ice::Current& c) { IceUtil::Mutex::Lock lock(_mutex); @@ -161,16 +161,16 @@ Filesystem::DirectoryI::find(const string& name, const Ice::Current& c) throw Ice::ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - NodeDict::iterator p = nodes.find(name); + NodeDict::iterator p = nodes.find(nm); if(p == nodes.end()) { - throw NoSuchName(name); + throw NoSuchName(nm); } return p->second; } Filesystem::DirectoryPrx -Filesystem::DirectoryI::createDirectory(const string& name, const Ice::Current& c) +Filesystem::DirectoryI::createDirectory(const string& nm, const Ice::Current& c) { IceUtil::Mutex::Lock lock(_mutex); @@ -179,29 +179,29 @@ Filesystem::DirectoryI::createDirectory(const string& name, const Ice::Current& throw Ice::ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - if(name.empty() || nodes.find(name) != nodes.end()) + if(nm.empty() || nodes.find(nm) != nodes.end()) { - throw NameInUse(name); + throw NameInUse(nm); } Ice::Identity id; id.name = IceUtil::generateUUID(); PersistentDirectoryPtr dir = new DirectoryI; - dir->nodeName = name; + dir->nodeName = nm; dir->parent = PersistentDirectoryPrx::uncheckedCast(c.adapter->createProxy(c.id)); DirectoryPrx proxy = DirectoryPrx::uncheckedCast(_evictor->add(dir, id)); NodeDesc nd; - nd.name = name; + nd.name = nm; nd.type = DirType; nd.proxy = proxy; - nodes[name] = nd; + nodes[nm] = nd; return proxy; } Filesystem::FilePrx -Filesystem::DirectoryI::createFile(const string& name, const Ice::Current& c) +Filesystem::DirectoryI::createFile(const string& nm, const Ice::Current& c) { IceUtil::Mutex::Lock lock(_mutex); @@ -210,33 +210,33 @@ Filesystem::DirectoryI::createFile(const string& name, const Ice::Current& c) throw Ice::ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - if(name.empty() || nodes.find(name) != nodes.end()) + if(nm.empty() || nodes.find(nm) != nodes.end()) { - throw NameInUse(name); + throw NameInUse(nm); } Ice::Identity id; id.name = IceUtil::generateUUID(); PersistentFilePtr file = new FileI; - file->nodeName = name; + file->nodeName = nm; file->parent = PersistentDirectoryPrx::uncheckedCast(c.adapter->createProxy(c.id)); FilePrx proxy = FilePrx::uncheckedCast(_evictor->add(file, id)); NodeDesc nd; - nd.name = name; + nd.name = nm; nd.type = FileType; nd.proxy = proxy; - nodes[name] = nd; + nodes[nm] = nd; return proxy; } void -Filesystem::DirectoryI::removeNode(const string& name, const Ice::Current&) +Filesystem::DirectoryI::removeNode(const string& nm, const Ice::Current&) { IceUtil::Mutex::Lock lock(_mutex); - NodeDict::iterator p = nodes.find(name); + NodeDict::iterator p = nodes.find(nm); assert(p != nodes.end()); nodes.erase(p); } diff --git a/cpp/demo/Manual/evictor_filesystem/Scanner.cpp b/cpp/demo/Manual/evictor_filesystem/Scanner.cpp index dd7b3732602..044f0be4e15 100644 --- a/cpp/demo/Manual/evictor_filesystem/Scanner.cpp +++ b/cpp/demo/Manual/evictor_filesystem/Scanner.cpp @@ -497,6 +497,7 @@ char *yytext; // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -541,7 +542,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 544 "lex.yy.c" +#line 545 "lex.yy.c" #define INITIAL 0 @@ -723,10 +724,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "Scanner.l" +#line 65 "Scanner.l" -#line 729 "lex.yy.c" +#line 730 "lex.yy.c" if ( !(yy_init) ) { @@ -811,7 +812,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 66 "Scanner.l" +#line 67 "Scanner.l" { // C++-style comment int c; @@ -824,7 +825,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 76 "Scanner.l" +#line 77 "Scanner.l" { // C-style comment while(true) @@ -852,77 +853,77 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 101 "Scanner.l" +#line 102 "Scanner.l" { return TOK_HELP; } YY_BREAK case 4: YY_RULE_SETUP -#line 105 "Scanner.l" +#line 106 "Scanner.l" { return TOK_EXIT; } YY_BREAK case 5: YY_RULE_SETUP -#line 109 "Scanner.l" +#line 110 "Scanner.l" { return TOK_LIST; } YY_BREAK case 6: YY_RULE_SETUP -#line 113 "Scanner.l" +#line 114 "Scanner.l" { return TOK_LIST_RECURSIVE; } YY_BREAK case 7: YY_RULE_SETUP -#line 117 "Scanner.l" +#line 118 "Scanner.l" { return TOK_CREATE_FILE; } YY_BREAK case 8: YY_RULE_SETUP -#line 121 "Scanner.l" +#line 122 "Scanner.l" { return TOK_CREATE_DIR; } YY_BREAK case 9: YY_RULE_SETUP -#line 125 "Scanner.l" +#line 126 "Scanner.l" { return TOK_PWD; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "Scanner.l" +#line 130 "Scanner.l" { return TOK_CD; } YY_BREAK case 11: YY_RULE_SETUP -#line 133 "Scanner.l" +#line 134 "Scanner.l" { return TOK_CAT; } YY_BREAK case 12: YY_RULE_SETUP -#line 137 "Scanner.l" +#line 138 "Scanner.l" { return TOK_WRITE; } YY_BREAK case 13: YY_RULE_SETUP -#line 141 "Scanner.l" +#line 142 "Scanner.l" { return TOK_RM; } @@ -930,7 +931,7 @@ YY_RULE_SETUP case 14: /* rule 14 can match eol */ YY_RULE_SETUP -#line 145 "Scanner.l" +#line 146 "Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -945,14 +946,14 @@ YY_RULE_SETUP case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 156 "Scanner.l" +#line 157 "Scanner.l" { return ';'; } YY_BREAK case 16: YY_RULE_SETUP -#line 160 "Scanner.l" +#line 161 "Scanner.l" { // "..."-type strings string s; @@ -1029,7 +1030,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 234 "Scanner.l" +#line 235 "Scanner.l" { // '...'-type strings string s; @@ -1057,7 +1058,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 259 "Scanner.l" +#line 260 "Scanner.l" { // Simple strings string s; @@ -1084,10 +1085,10 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 283 "Scanner.l" +#line 284 "Scanner.l" ECHO; YY_BREAK -#line 1090 "lex.yy.c" +#line 1091 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2081,7 +2082,9 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 283 "Scanner.l" +#line 284 "Scanner.l" +#include <IceUtil/PopDisableWarnings.h> + diff --git a/cpp/demo/Manual/evictor_filesystem/Scanner.l b/cpp/demo/Manual/evictor_filesystem/Scanner.l index c2e42f0eb65..b2292cfbe3c 100644 --- a/cpp/demo/Manual/evictor_filesystem/Scanner.l +++ b/cpp/demo/Manual/evictor_filesystem/Scanner.l @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -281,3 +282,5 @@ NL [\n] } %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Manual/lifecycle/Filesystem.ice b/cpp/demo/Manual/lifecycle/Filesystem.ice index f3b3412a59b..bd925f659d0 100644 --- a/cpp/demo/Manual/lifecycle/Filesystem.ice +++ b/cpp/demo/Manual/lifecycle/Filesystem.ice @@ -44,8 +44,8 @@ module Filesystem { interface Directory extends Node { idempotent NodeDescSeq list(); - idempotent NodeDesc find(string name) throws NoSuchName; - File* createFile(string name) throws NameInUse; - Directory* createDirectory(string name) throws NameInUse; + idempotent NodeDesc find(string nm) throws NoSuchName; + File* createFile(string nm) throws NameInUse; + Directory* createDirectory(string nm) throws NameInUse; }; }; diff --git a/cpp/demo/Manual/lifecycle/FilesystemI.cpp b/cpp/demo/Manual/lifecycle/FilesystemI.cpp index 982e72311db..86b2533e343 100644 --- a/cpp/demo/Manual/lifecycle/FilesystemI.cpp +++ b/cpp/demo/Manual/lifecycle/FilesystemI.cpp @@ -40,8 +40,8 @@ FilesystemI::NodeI::id() const // NodeI constructor. -FilesystemI::NodeI::NodeI(const string& name, const DirectoryIPtr& parent) - : _name(name), _parent(parent), _destroyed(false) +FilesystemI::NodeI::NodeI(const string& nm, const DirectoryIPtr& parent) + : _name(nm), _parent(parent), _destroyed(false) { // // Create an identity. The root directory has the fixed identity "RootDir". @@ -108,8 +108,8 @@ FilesystemI::FileI::destroy(const Current& c) // FileI constructor. -FilesystemI::FileI::FileI(const string& name, const DirectoryIPtr& parent) - : NodeI(name, parent) +FilesystemI::FileI::FileI(const string& nm, const DirectoryIPtr& parent) + : NodeI(nm, parent) { } @@ -140,7 +140,7 @@ FilesystemI::DirectoryI::list(const Current& c) // Slice Directory::find() operation. NodeDesc -FilesystemI::DirectoryI::find(const string& name, const Current& c) +FilesystemI::DirectoryI::find(const string& nm, const Current& c) { IceUtil::Mutex::Lock lock(_m); @@ -149,15 +149,15 @@ FilesystemI::DirectoryI::find(const string& name, const Current& c) throw ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - Contents::const_iterator pos = _contents.find(name); + Contents::const_iterator pos = _contents.find(nm); if(pos == _contents.end()) { - throw NoSuchName(name); + throw NoSuchName(nm); } NodeIPtr p = pos->second; NodeDesc d; - d.name = name; + d.name = nm; d.type = FilePtr::dynamicCast(p) ? FileType : DirType; d.proxy = NodePrx::uncheckedCast(c.adapter->createProxy(p->id())); return d; @@ -166,7 +166,7 @@ FilesystemI::DirectoryI::find(const string& name, const Current& c) // Slice Directory::createFile() operation. FilePrx -FilesystemI::DirectoryI::createFile(const string& name, const Current& c) +FilesystemI::DirectoryI::createFile(const string& nm, const Current& c) { IceUtil::Mutex::Lock lock(_m); @@ -175,21 +175,21 @@ FilesystemI::DirectoryI::createFile(const string& name, const Current& c) throw ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - if(name.empty() || _contents.find(name) != _contents.end()) + if(nm.empty() || _contents.find(nm) != _contents.end()) { - throw NameInUse(name); + throw NameInUse(nm); } - FileIPtr f = new FileI(name, this); + FileIPtr f = new FileI(nm, this); ObjectPrx node = c.adapter->add(f, f->id()); - _contents[name] = f; + _contents[nm] = f; return FilePrx::uncheckedCast(node); } // Slice Directory::createDirectory() operation. DirectoryPrx -FilesystemI::DirectoryI::createDirectory(const string& name, const Current& c) +FilesystemI::DirectoryI::createDirectory(const string& nm, const Current& c) { IceUtil::Mutex::Lock lock(_m); @@ -198,14 +198,14 @@ FilesystemI::DirectoryI::createDirectory(const string& name, const Current& c) throw ObjectNotExistException(__FILE__, __LINE__, c.id, c.facet, c.operation); } - if(name.empty() || _contents.find(name) != _contents.end()) + if(nm.empty() || _contents.find(nm) != _contents.end()) { - throw NameInUse(name); + throw NameInUse(nm); } - DirectoryIPtr d = new DirectoryI(name, this); + DirectoryIPtr d = new DirectoryI(nm, this); ObjectPrx node = c.adapter->add(d, d->id()); - _contents[name] = d; + _contents[nm] = d; return DirectoryPrx::uncheckedCast(node); } @@ -241,18 +241,18 @@ FilesystemI::DirectoryI::destroy(const Current& c) // DirectoryI constructor. -FilesystemI::DirectoryI::DirectoryI(const string& name, const DirectoryIPtr& parent) - : NodeI(name, parent) +FilesystemI::DirectoryI::DirectoryI(const string& nm, const DirectoryIPtr& parent) + : NodeI(nm, parent) { } // Remove the entry from the _contents map. void -FilesystemI::DirectoryI::removeEntry(const string& name) +FilesystemI::DirectoryI::removeEntry(const string& nm) { IceUtil::Mutex::Lock lock(_m); - Contents::iterator i = _contents.find(name); + Contents::iterator i = _contents.find(nm); if(i != _contents.end()) { _contents.erase(i); diff --git a/cpp/demo/Manual/lifecycle/Grammar.cpp b/cpp/demo/Manual/lifecycle/Grammar.cpp index b65090aaa38..3fed0da3e14 100644 --- a/cpp/demo/Manual/lifecycle/Grammar.cpp +++ b/cpp/demo/Manual/lifecycle/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,49 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_HELP = 258, - TOK_EXIT = 259, - TOK_STRING = 260, - TOK_LIST = 261, - TOK_LIST_RECURSIVE = 262, - TOK_CREATE_FILE = 263, - TOK_CREATE_DIR = 264, - TOK_PWD = 265, - TOK_CD = 266, - TOK_CAT = 267, - TOK_WRITE = 268, - TOK_RM = 269 - }; -#endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 +/* Pull parsers. */ +#define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -110,6 +80,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -136,6 +107,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 112 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -154,20 +128,43 @@ yyerror(const char* s) # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_HELP = 258, + TOK_EXIT = 259, + TOK_STRING = 260, + TOK_LIST = 261, + TOK_LIST_RECURSIVE = 262, + TOK_CREATE_FILE = 263, + TOK_CREATE_DIR = 264, + TOK_PWD = 265, + TOK_CD = 266, + TOK_CAT = 267, + TOK_WRITE = 268, + TOK_RM = 269 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 171 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 168 "Grammar.tab.c" #ifdef short # undef short @@ -242,14 +239,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -330,9 +327,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -366,12 +363,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -456,9 +453,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 58, 58, 62, 69, 72, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, 128, 133, - 141, 146 + 0, 59, 59, 63, 70, 73, 81, 85, 89, 93, + 97, 101, 105, 109, 113, 117, 121, 125, 129, 134, + 142, 147 }; #endif @@ -746,17 +743,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -790,11 +790,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1074,10 +1074,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1096,10 +1094,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1123,74 +1120,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* Number of syntax errors so far. */ + int yynerrs; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1220,7 +1218,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1228,7 +1225,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1251,9 +1247,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1264,7 +1259,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1274,6 +1268,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1282,16 +1279,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1323,20 +1320,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1376,115 +1369,149 @@ yyreduce: switch (yyn) { case 2: -#line 59 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 60 "Grammar.y" { ;} break; case 3: -#line 62 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 63 "Grammar.y" { ;} break; case 4: -#line 70 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 71 "Grammar.y" { ;} break; case 5: -#line 73 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 74 "Grammar.y" { ;} break; case 6: -#line 81 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 82 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 85 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 86 "Grammar.y" { return 0; ;} break; case 8: -#line 89 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 90 "Grammar.y" { parser->list(false); ;} break; case 9: -#line 93 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 94 "Grammar.y" { parser->list(true); ;} break; case 10: -#line 97 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 98 "Grammar.y" { parser->createFile((yyvsp[(2) - (2)])); ;} break; case 11: -#line 101 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 102 "Grammar.y" { parser->createDir((yyvsp[(2) - (2)])); ;} break; case 12: -#line 105 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 106 "Grammar.y" { parser->pwd(); ;} break; case 13: -#line 109 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 110 "Grammar.y" { parser->cd("/"); ;} break; case 14: -#line 113 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 114 "Grammar.y" { parser->cd((yyvsp[(2) - (2)]).front()); ;} break; case 15: -#line 117 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 118 "Grammar.y" { parser->cat((yyvsp[(2) - (2)]).front()); ;} break; case 16: -#line 121 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 122 "Grammar.y" { parser->write((yyvsp[(2) - (2)])); ;} break; case 17: -#line 125 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 126 "Grammar.y" { parser->destroy((yyvsp[(2) - (2)])); ;} break; case 18: -#line 129 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 130 "Grammar.y" { parser->usage(); yyerrok; @@ -1492,13 +1519,17 @@ yyreduce: break; case 19: -#line 134 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 135 "Grammar.y" { ;} break; case 20: -#line 142 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 143 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1506,15 +1537,18 @@ yyreduce: break; case 21: -#line 147 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 148 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); ;} break; -/* Line 1267 of yacc.c. */ -#line 1518 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1552 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1525,7 +1559,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1590,7 +1623,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1607,7 +1640,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1664,9 +1697,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1691,7 +1721,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1702,7 +1732,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1728,6 +1758,10 @@ yyreturn: } -#line 152 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 153 "Grammar.y" + + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/lifecycle/Grammar.h b/cpp/demo/Manual/lifecycle/Grammar.h index b5b8e41ade4..ca5a99150f6 100644 --- a/cpp/demo/Manual/lifecycle/Grammar.h +++ b/cpp/demo/Manual/lifecycle/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -53,29 +53,16 @@ TOK_RM = 269 }; #endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/cpp/demo/Manual/lifecycle/Grammar.y b/cpp/demo/Manual/lifecycle/Grammar.y index 7c3cb792f11..9e17eb2a8e7 100644 --- a/cpp/demo/Manual/lifecycle/Grammar.y +++ b/cpp/demo/Manual/lifecycle/Grammar.y @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -150,3 +151,5 @@ strings ; %% + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/lifecycle/Makefile b/cpp/demo/Manual/lifecycle/Makefile index 543c669ca80..cd2a03bfabc 100644 --- a/cpp/demo/Manual/lifecycle/Makefile +++ b/cpp/demo/Manual/lifecycle/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Manual/lifecycle/Makefile.mak b/cpp/demo/Manual/lifecycle/Makefile.mak index 073d7540dfd..a7ca4d97001 100644 --- a/cpp/demo/Manual/lifecycle/Makefile.mak +++ b/cpp/demo/Manual/lifecycle/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Manual/lifecycle/Scanner.cpp b/cpp/demo/Manual/lifecycle/Scanner.cpp index dd7b3732602..044f0be4e15 100644 --- a/cpp/demo/Manual/lifecycle/Scanner.cpp +++ b/cpp/demo/Manual/lifecycle/Scanner.cpp @@ -497,6 +497,7 @@ char *yytext; // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -541,7 +542,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 544 "lex.yy.c" +#line 545 "lex.yy.c" #define INITIAL 0 @@ -723,10 +724,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "Scanner.l" +#line 65 "Scanner.l" -#line 729 "lex.yy.c" +#line 730 "lex.yy.c" if ( !(yy_init) ) { @@ -811,7 +812,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 66 "Scanner.l" +#line 67 "Scanner.l" { // C++-style comment int c; @@ -824,7 +825,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 76 "Scanner.l" +#line 77 "Scanner.l" { // C-style comment while(true) @@ -852,77 +853,77 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 101 "Scanner.l" +#line 102 "Scanner.l" { return TOK_HELP; } YY_BREAK case 4: YY_RULE_SETUP -#line 105 "Scanner.l" +#line 106 "Scanner.l" { return TOK_EXIT; } YY_BREAK case 5: YY_RULE_SETUP -#line 109 "Scanner.l" +#line 110 "Scanner.l" { return TOK_LIST; } YY_BREAK case 6: YY_RULE_SETUP -#line 113 "Scanner.l" +#line 114 "Scanner.l" { return TOK_LIST_RECURSIVE; } YY_BREAK case 7: YY_RULE_SETUP -#line 117 "Scanner.l" +#line 118 "Scanner.l" { return TOK_CREATE_FILE; } YY_BREAK case 8: YY_RULE_SETUP -#line 121 "Scanner.l" +#line 122 "Scanner.l" { return TOK_CREATE_DIR; } YY_BREAK case 9: YY_RULE_SETUP -#line 125 "Scanner.l" +#line 126 "Scanner.l" { return TOK_PWD; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "Scanner.l" +#line 130 "Scanner.l" { return TOK_CD; } YY_BREAK case 11: YY_RULE_SETUP -#line 133 "Scanner.l" +#line 134 "Scanner.l" { return TOK_CAT; } YY_BREAK case 12: YY_RULE_SETUP -#line 137 "Scanner.l" +#line 138 "Scanner.l" { return TOK_WRITE; } YY_BREAK case 13: YY_RULE_SETUP -#line 141 "Scanner.l" +#line 142 "Scanner.l" { return TOK_RM; } @@ -930,7 +931,7 @@ YY_RULE_SETUP case 14: /* rule 14 can match eol */ YY_RULE_SETUP -#line 145 "Scanner.l" +#line 146 "Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -945,14 +946,14 @@ YY_RULE_SETUP case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 156 "Scanner.l" +#line 157 "Scanner.l" { return ';'; } YY_BREAK case 16: YY_RULE_SETUP -#line 160 "Scanner.l" +#line 161 "Scanner.l" { // "..."-type strings string s; @@ -1029,7 +1030,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 234 "Scanner.l" +#line 235 "Scanner.l" { // '...'-type strings string s; @@ -1057,7 +1058,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 259 "Scanner.l" +#line 260 "Scanner.l" { // Simple strings string s; @@ -1084,10 +1085,10 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 283 "Scanner.l" +#line 284 "Scanner.l" ECHO; YY_BREAK -#line 1090 "lex.yy.c" +#line 1091 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2081,7 +2082,9 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 283 "Scanner.l" +#line 284 "Scanner.l" +#include <IceUtil/PopDisableWarnings.h> + diff --git a/cpp/demo/Manual/lifecycle/Scanner.l b/cpp/demo/Manual/lifecycle/Scanner.l index c2e42f0eb65..b2292cfbe3c 100644 --- a/cpp/demo/Manual/lifecycle/Scanner.l +++ b/cpp/demo/Manual/lifecycle/Scanner.l @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -281,3 +282,5 @@ NL [\n] } %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Manual/map_filesystem/Filesystem.ice b/cpp/demo/Manual/map_filesystem/Filesystem.ice index 72209ae51ea..7957960eadd 100644 --- a/cpp/demo/Manual/map_filesystem/Filesystem.ice +++ b/cpp/demo/Manual/map_filesystem/Filesystem.ice @@ -45,8 +45,8 @@ module Filesystem interface Directory extends Node { idempotent NodeDescSeq list(); - idempotent NodeDesc find(string name) throws NoSuchName; - File* createFile(string name) throws NameInUse; - Directory* createDirectory(string name) throws NameInUse; + idempotent NodeDesc find(string nm) throws NoSuchName; + File* createFile(string nm) throws NameInUse; + Directory* createDirectory(string nm) throws NameInUse; }; }; diff --git a/cpp/demo/Manual/map_filesystem/FilesystemI.cpp b/cpp/demo/Manual/map_filesystem/FilesystemI.cpp index 90cba1f3e51..1243f5b4596 100644 --- a/cpp/demo/Manual/map_filesystem/FilesystemI.cpp +++ b/cpp/demo/Manual/map_filesystem/FilesystemI.cpp @@ -274,7 +274,7 @@ DirectoryI::list(const Ice::Current& c) } NodeDesc -DirectoryI::find(const string& name, const Ice::Current& c) +DirectoryI::find(const string& nm, const Ice::Current& c) { const Freeze::ConnectionPtr connection(Freeze::createConnection(_communicator, _envName)); IdentityDirectoryEntryMap directoryDB(connection, directoriesDB()); @@ -288,10 +288,10 @@ DirectoryI::find(const string& name, const Ice::Current& c) { throw Ice::ObjectNotExistException(__FILE__, __LINE__); } - StringNodeDescDict::const_iterator q = p->second.nodes.find(name); + StringNodeDescDict::const_iterator q = p->second.nodes.find(nm); if(q == p->second.nodes.end()) { - throw NoSuchName(name); + throw NoSuchName(nm); } return q->second; } @@ -307,7 +307,7 @@ DirectoryI::find(const string& name, const Ice::Current& c) } DirectoryPrx -DirectoryI::createDirectory(const string& name, const Ice::Current& c) +DirectoryI::createDirectory(const string& nm, const Ice::Current& c) { const Freeze::ConnectionPtr connection(Freeze::createConnection(_communicator, _envName)); IdentityDirectoryEntryMap directoryDB(connection, directoriesDB()); @@ -329,13 +329,13 @@ DirectoryI::createDirectory(const string& name, const Ice::Current& c) } DirectoryEntry entry = p->second; - if(name.empty() || entry.nodes.find(name) != entry.nodes.end()) + if(nm.empty() || entry.nodes.find(nm) != entry.nodes.end()) { - throw NameInUse(name); + throw NameInUse(nm); } DirectoryEntry d; - d.name = name; + d.name = nm; d.parent = c.id; Ice::Identity id; @@ -343,10 +343,10 @@ DirectoryI::createDirectory(const string& name, const Ice::Current& c) DirectoryPrx proxy = DirectoryPrx::uncheckedCast(c.adapter->createProxy(id)); NodeDesc nd; - nd.name = name; + nd.name = nm; nd.type = DirType; nd.proxy = proxy; - entry.nodes.insert(make_pair(name, nd)); + entry.nodes.insert(make_pair(nm, nd)); p.set(entry); #ifdef __SUNPRO_CC @@ -371,7 +371,7 @@ DirectoryI::createDirectory(const string& name, const Ice::Current& c) } FilePrx -DirectoryI::createFile(const string& name, const Ice::Current& c) +DirectoryI::createFile(const string& nm, const Ice::Current& c) { const Freeze::ConnectionPtr connection(Freeze::createConnection(_communicator, _envName)); IdentityFileEntryMap fileDB(connection, FileI::filesDB()); @@ -394,13 +394,13 @@ DirectoryI::createFile(const string& name, const Ice::Current& c) } DirectoryEntry entry = p->second; - if(name.empty() || entry.nodes.find(name) != entry.nodes.end()) + if(nm.empty() || entry.nodes.find(nm) != entry.nodes.end()) { - throw NameInUse(name); + throw NameInUse(nm); } FileEntry d; - d.name = name; + d.name = nm; d.parent = c.id; Ice::Identity id; @@ -409,10 +409,10 @@ DirectoryI::createFile(const string& name, const Ice::Current& c) FilePrx proxy = FilePrx::uncheckedCast(c.adapter->createProxy(id)); NodeDesc nd; - nd.name = name; + nd.name = nm; nd.type = FileType; nd.proxy = proxy; - entry.nodes.insert(make_pair(name, nd)); + entry.nodes.insert(make_pair(nm, nd)); p.set(entry); diff --git a/cpp/demo/Manual/map_filesystem/Grammar.cpp b/cpp/demo/Manual/map_filesystem/Grammar.cpp index b65090aaa38..3fed0da3e14 100644 --- a/cpp/demo/Manual/map_filesystem/Grammar.cpp +++ b/cpp/demo/Manual/map_filesystem/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,49 +54,20 @@ /* Pure parsers. */ #define YYPURE 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 - - +/* Push parsers. */ +#define YYPUSH 0 -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOK_HELP = 258, - TOK_EXIT = 259, - TOK_STRING = 260, - TOK_LIST = 261, - TOK_LIST_RECURSIVE = 262, - TOK_CREATE_FILE = 263, - TOK_CREATE_DIR = 264, - TOK_PWD = 265, - TOK_CD = 266, - TOK_CAT = 267, - TOK_WRITE = 268, - TOK_RM = 269 - }; -#endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 +/* Pull parsers. */ +#define YYPULL 1 +/* Using locations. */ +#define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "Grammar.y" @@ -110,6 +80,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -136,6 +107,9 @@ yyerror(const char* s) +/* Line 189 of yacc.c */ +#line 112 "Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 @@ -154,20 +128,43 @@ yyerror(const char* s) # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOK_HELP = 258, + TOK_EXIT = 259, + TOK_STRING = 260, + TOK_LIST = 261, + TOK_LIST_RECURSIVE = 262, + TOK_CREATE_FILE = 263, + TOK_CREATE_DIR = 264, + TOK_PWD = 265, + TOK_CD = 266, + TOK_CAT = 267, + TOK_WRITE = 268, + TOK_RM = 269 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 171 "Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 168 "Grammar.tab.c" #ifdef short # undef short @@ -242,14 +239,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -330,9 +327,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -366,12 +363,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -456,9 +453,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 58, 58, 62, 69, 72, 80, 84, 88, 92, - 96, 100, 104, 108, 112, 116, 120, 124, 128, 133, - 141, 146 + 0, 59, 59, 63, 70, 73, 81, 85, 89, 93, + 97, 101, 105, 109, 113, 117, 121, 125, 129, 134, + 142, 147 }; #endif @@ -746,17 +743,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -790,11 +790,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1074,10 +1074,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1096,10 +1094,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1123,74 +1120,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + /* Number of syntax errors so far. */ + int yynerrs; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1220,7 +1218,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1228,7 +1225,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1251,9 +1247,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1264,7 +1259,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1274,6 +1268,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1282,16 +1279,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1323,20 +1320,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1376,115 +1369,149 @@ yyreduce: switch (yyn) { case 2: -#line 59 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 60 "Grammar.y" { ;} break; case 3: -#line 62 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 63 "Grammar.y" { ;} break; case 4: -#line 70 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 71 "Grammar.y" { ;} break; case 5: -#line 73 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 74 "Grammar.y" { ;} break; case 6: -#line 81 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 82 "Grammar.y" { parser->usage(); ;} break; case 7: -#line 85 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 86 "Grammar.y" { return 0; ;} break; case 8: -#line 89 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 90 "Grammar.y" { parser->list(false); ;} break; case 9: -#line 93 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 94 "Grammar.y" { parser->list(true); ;} break; case 10: -#line 97 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 98 "Grammar.y" { parser->createFile((yyvsp[(2) - (2)])); ;} break; case 11: -#line 101 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 102 "Grammar.y" { parser->createDir((yyvsp[(2) - (2)])); ;} break; case 12: -#line 105 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 106 "Grammar.y" { parser->pwd(); ;} break; case 13: -#line 109 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 110 "Grammar.y" { parser->cd("/"); ;} break; case 14: -#line 113 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 114 "Grammar.y" { parser->cd((yyvsp[(2) - (2)]).front()); ;} break; case 15: -#line 117 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 118 "Grammar.y" { parser->cat((yyvsp[(2) - (2)]).front()); ;} break; case 16: -#line 121 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 122 "Grammar.y" { parser->write((yyvsp[(2) - (2)])); ;} break; case 17: -#line 125 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 126 "Grammar.y" { parser->destroy((yyvsp[(2) - (2)])); ;} break; case 18: -#line 129 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 130 "Grammar.y" { parser->usage(); yyerrok; @@ -1492,13 +1519,17 @@ yyreduce: break; case 19: -#line 134 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 135 "Grammar.y" { ;} break; case 20: -#line 142 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 143 "Grammar.y" { (yyval) = (yyvsp[(2) - (2)]); (yyval).push_front((yyvsp[(1) - (2)]).front()); @@ -1506,15 +1537,18 @@ yyreduce: break; case 21: -#line 147 "Grammar.y" + +/* Line 1455 of yacc.c */ +#line 148 "Grammar.y" { (yyval) = (yyvsp[(1) - (1)]); ;} break; -/* Line 1267 of yacc.c. */ -#line 1518 "Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 1552 "Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1525,7 +1559,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1590,7 +1623,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -1607,7 +1640,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -1664,9 +1697,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -1691,7 +1721,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -1702,7 +1732,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -1728,6 +1758,10 @@ yyreturn: } -#line 152 "Grammar.y" +/* Line 1675 of yacc.c */ +#line 153 "Grammar.y" + + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/map_filesystem/Grammar.h b/cpp/demo/Manual/map_filesystem/Grammar.h index b5b8e41ade4..ca5a99150f6 100644 --- a/cpp/demo/Manual/map_filesystem/Grammar.h +++ b/cpp/demo/Manual/map_filesystem/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -53,29 +53,16 @@ TOK_RM = 269 }; #endif -/* Tokens. */ -#define TOK_HELP 258 -#define TOK_EXIT 259 -#define TOK_STRING 260 -#define TOK_LIST 261 -#define TOK_LIST_RECURSIVE 262 -#define TOK_CREATE_FILE 263 -#define TOK_CREATE_DIR 264 -#define TOK_PWD 265 -#define TOK_CD 266 -#define TOK_CAT 267 -#define TOK_WRITE 268 -#define TOK_RM 269 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/cpp/demo/Manual/map_filesystem/Grammar.y b/cpp/demo/Manual/map_filesystem/Grammar.y index 7c3cb792f11..9e17eb2a8e7 100644 --- a/cpp/demo/Manual/map_filesystem/Grammar.y +++ b/cpp/demo/Manual/map_filesystem/Grammar.y @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #ifdef _MSC_VER @@ -150,3 +151,5 @@ strings ; %% + +#include <IceUtil/PushDisableWarnings.h> diff --git a/cpp/demo/Manual/map_filesystem/Makefile b/cpp/demo/Manual/map_filesystem/Makefile index 4faea9c37b6..3ac4b1e2c0b 100644 --- a/cpp/demo/Manual/map_filesystem/Makefile +++ b/cpp/demo/Manual/map_filesystem/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Manual/map_filesystem/Makefile.mak b/cpp/demo/Manual/map_filesystem/Makefile.mak index 9b8c1e7cc01..b28240c0a8d 100644 --- a/cpp/demo/Manual/map_filesystem/Makefile.mak +++ b/cpp/demo/Manual/map_filesystem/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Manual/map_filesystem/Scanner.cpp b/cpp/demo/Manual/map_filesystem/Scanner.cpp index dd7b3732602..044f0be4e15 100644 --- a/cpp/demo/Manual/map_filesystem/Scanner.cpp +++ b/cpp/demo/Manual/map_filesystem/Scanner.cpp @@ -497,6 +497,7 @@ char *yytext; // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -541,7 +542,7 @@ using namespace std; #define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize) -#line 544 "lex.yy.c" +#line 545 "lex.yy.c" #define INITIAL 0 @@ -723,10 +724,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 64 "Scanner.l" +#line 65 "Scanner.l" -#line 729 "lex.yy.c" +#line 730 "lex.yy.c" if ( !(yy_init) ) { @@ -811,7 +812,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 66 "Scanner.l" +#line 67 "Scanner.l" { // C++-style comment int c; @@ -824,7 +825,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 76 "Scanner.l" +#line 77 "Scanner.l" { // C-style comment while(true) @@ -852,77 +853,77 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 101 "Scanner.l" +#line 102 "Scanner.l" { return TOK_HELP; } YY_BREAK case 4: YY_RULE_SETUP -#line 105 "Scanner.l" +#line 106 "Scanner.l" { return TOK_EXIT; } YY_BREAK case 5: YY_RULE_SETUP -#line 109 "Scanner.l" +#line 110 "Scanner.l" { return TOK_LIST; } YY_BREAK case 6: YY_RULE_SETUP -#line 113 "Scanner.l" +#line 114 "Scanner.l" { return TOK_LIST_RECURSIVE; } YY_BREAK case 7: YY_RULE_SETUP -#line 117 "Scanner.l" +#line 118 "Scanner.l" { return TOK_CREATE_FILE; } YY_BREAK case 8: YY_RULE_SETUP -#line 121 "Scanner.l" +#line 122 "Scanner.l" { return TOK_CREATE_DIR; } YY_BREAK case 9: YY_RULE_SETUP -#line 125 "Scanner.l" +#line 126 "Scanner.l" { return TOK_PWD; } YY_BREAK case 10: YY_RULE_SETUP -#line 129 "Scanner.l" +#line 130 "Scanner.l" { return TOK_CD; } YY_BREAK case 11: YY_RULE_SETUP -#line 133 "Scanner.l" +#line 134 "Scanner.l" { return TOK_CAT; } YY_BREAK case 12: YY_RULE_SETUP -#line 137 "Scanner.l" +#line 138 "Scanner.l" { return TOK_WRITE; } YY_BREAK case 13: YY_RULE_SETUP -#line 141 "Scanner.l" +#line 142 "Scanner.l" { return TOK_RM; } @@ -930,7 +931,7 @@ YY_RULE_SETUP case 14: /* rule 14 can match eol */ YY_RULE_SETUP -#line 145 "Scanner.l" +#line 146 "Scanner.l" { size_t len = strlen(yytext); for(size_t i = 0; i < len; ++i) @@ -945,14 +946,14 @@ YY_RULE_SETUP case 15: /* rule 15 can match eol */ YY_RULE_SETUP -#line 156 "Scanner.l" +#line 157 "Scanner.l" { return ';'; } YY_BREAK case 16: YY_RULE_SETUP -#line 160 "Scanner.l" +#line 161 "Scanner.l" { // "..."-type strings string s; @@ -1029,7 +1030,7 @@ YY_RULE_SETUP YY_BREAK case 17: YY_RULE_SETUP -#line 234 "Scanner.l" +#line 235 "Scanner.l" { // '...'-type strings string s; @@ -1057,7 +1058,7 @@ YY_RULE_SETUP YY_BREAK case 18: YY_RULE_SETUP -#line 259 "Scanner.l" +#line 260 "Scanner.l" { // Simple strings string s; @@ -1084,10 +1085,10 @@ YY_RULE_SETUP YY_BREAK case 19: YY_RULE_SETUP -#line 283 "Scanner.l" +#line 284 "Scanner.l" ECHO; YY_BREAK -#line 1090 "lex.yy.c" +#line 1091 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2081,7 +2082,9 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 283 "Scanner.l" +#line 284 "Scanner.l" +#include <IceUtil/PopDisableWarnings.h> + diff --git a/cpp/demo/Manual/map_filesystem/Scanner.l b/cpp/demo/Manual/map_filesystem/Scanner.l index c2e42f0eb65..b2292cfbe3c 100644 --- a/cpp/demo/Manual/map_filesystem/Scanner.l +++ b/cpp/demo/Manual/map_filesystem/Scanner.l @@ -9,6 +9,7 @@ // // ********************************************************************** +#include <IceUtil/PushDisableWarnings.h> #include <Parser.h> #include <Grammar.h> @@ -281,3 +282,5 @@ NL [\n] } %% + +#include <IceUtil/PopDisableWarnings.h> diff --git a/cpp/demo/Manual/printer/Makefile b/cpp/demo/Manual/printer/Makefile index 5be0f78f821..67c4a9ba85e 100644 --- a/cpp/demo/Manual/printer/Makefile +++ b/cpp/demo/Manual/printer/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Manual/printer/Makefile.mak b/cpp/demo/Manual/printer/Makefile.mak index 7cd1aed65bd..52e04bbbd76 100644 --- a/cpp/demo/Manual/printer/Makefile.mak +++ b/cpp/demo/Manual/printer/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/cpp/demo/Manual/simple_filesystem/Client.cpp b/cpp/demo/Manual/simple_filesystem/Client.cpp index 2452da99f63..1a225684df3 100644 --- a/cpp/demo/Manual/simple_filesystem/Client.cpp +++ b/cpp/demo/Manual/simple_filesystem/Client.cpp @@ -28,12 +28,12 @@ listRecursive(const DirectoryPrx& dir, int depth = 0) for(NodeSeq::const_iterator i = contents.begin(); i != contents.end(); ++i) { - DirectoryPrx dir = DirectoryPrx::checkedCast(*i); + DirectoryPrx d = DirectoryPrx::checkedCast(*i); FilePrx file = FilePrx::uncheckedCast(*i); - cout << indent << (*i)->name() << (dir ? " (directory):" : " (file):") << endl; - if(dir) + cout << indent << (*i)->name() << (d ? " (directory):" : " (file):") << endl; + if(d) { - listRecursive(dir, depth); + listRecursive(d, depth); } else { diff --git a/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp b/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp index 13aa70d2a8d..b4b8a461cad 100644 --- a/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp +++ b/cpp/demo/Manual/simple_filesystem/FilesystemI.cpp @@ -22,8 +22,8 @@ Filesystem::NodeI::name(const Ice::Current&) // NodeI constructor -Filesystem::NodeI::NodeI(const Ice::CommunicatorPtr&, const string& name, const DirectoryIPtr& parent) : - _name(name), _parent(parent) +Filesystem::NodeI::NodeI(const Ice::CommunicatorPtr&, const string& nm, const DirectoryIPtr& parent) : + _name(nm), _parent(parent) { // Create an identity. The root directory has the fixed identity "RootDir" if(parent) @@ -66,8 +66,8 @@ Filesystem::FileI::write(const Filesystem::Lines& text, const Ice::Current&) // FileI constructor -Filesystem::FileI::FileI(const Ice::CommunicatorPtr& communicator, const string& name, const DirectoryIPtr& parent) : - NodeI(communicator, name, parent) +Filesystem::FileI::FileI(const Ice::CommunicatorPtr& communicator, const string& nm, const DirectoryIPtr& parent) : + NodeI(communicator, nm, parent) { } @@ -81,9 +81,9 @@ Filesystem::DirectoryI::list(const Ice::Current&) // DirectoryI constructor -Filesystem::DirectoryI::DirectoryI(const Ice::CommunicatorPtr& communicator, const string& name, +Filesystem::DirectoryI::DirectoryI(const Ice::CommunicatorPtr& communicator, const string& nm, const DirectoryIPtr& parent) : - NodeI(communicator, name, parent) + NodeI(communicator, nm, parent) { } diff --git a/cpp/demo/Manual/simple_filesystem/Makefile b/cpp/demo/Manual/simple_filesystem/Makefile index 9b04bf928a8..d1a41aa9833 100644 --- a/cpp/demo/Manual/simple_filesystem/Makefile +++ b/cpp/demo/Manual/simple_filesystem/Makefile @@ -9,6 +9,10 @@ top_srcdir = ../../.. +ifeq ($(shell test -f $(top_srcdir)/../.gitignore && echo 0),0) +MAXWARN = yes +endif + CLIENT = client SERVER = server diff --git a/cpp/demo/Manual/simple_filesystem/Makefile.mak b/cpp/demo/Manual/simple_filesystem/Makefile.mak index 1d71f99c229..d28815d2064 100644 --- a/cpp/demo/Manual/simple_filesystem/Makefile.mak +++ b/cpp/demo/Manual/simple_filesystem/Makefile.mak @@ -9,6 +9,10 @@ top_srcdir = ..\..\.. +!if exist ($(top_srcdir)\..\.gitignore) +MAXWARN = yes +!endif + CLIENT = client.exe SERVER = server.exe diff --git a/slice/IceGrid/Admin.ice b/slice/IceGrid/Admin.ice index 42c11385002..f237d880dc6 100644 --- a/slice/IceGrid/Admin.ice +++ b/slice/IceGrid/Admin.ice @@ -558,7 +558,7 @@ interface Admin * @throws PatchException Raised if the patch failed. * **/ - ["amd"] void patchApplication(string name, bool shutdown) + ["amd"] void patchApplication(string name, bool shutdwn) throws ApplicationNotExistException, PatchException; /** @@ -792,7 +792,7 @@ interface Admin * @throws PatchException Raised if the patch failed. * **/ - ["amd"] void patchServer(string id, bool shutdown) + ["amd"] void patchServer(string id, bool shutdwn) throws ServerNotExistException, NodeUnreachableException, DeploymentException, PatchException; /** |