diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-11-26 15:57:26 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-11-26 15:57:26 +0000 |
commit | e0974e8cb74f09a78abc6d3ceafdfbf156b5b56b (patch) | |
tree | e0bd9770b7bb6ec6ab91a0a3c37584c2751fb2dc /cpp/src | |
parent | file TwowaysAMI.cpp was initially added on branch ami. (diff) | |
download | ice-e0974e8cb74f09a78abc6d3ceafdfbf156b5b56b.tar.bz2 ice-e0974e8cb74f09a78abc6d3ceafdfbf156b5b56b.tar.xz ice-e0974e8cb74f09a78abc6d3ceafdfbf156b5b56b.zip |
Fixed warnings when compiled with optimization.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IcePack/AdapterFactory.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IcePack/IcePackNode.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerBuilder.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerFactory.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Yellow/Makefile | 2 |
6 files changed, 8 insertions, 4 deletions
diff --git a/cpp/src/IcePack/AdapterFactory.cpp b/cpp/src/IcePack/AdapterFactory.cpp index 26e8df3d43d..9cf85554f8d 100644 --- a/cpp/src/IcePack/AdapterFactory.cpp +++ b/cpp/src/IcePack/AdapterFactory.cpp @@ -60,6 +60,7 @@ IcePack::AdapterFactory::create(const string& type) else { assert(false); + return 0; // Keep the compiler happy. } } diff --git a/cpp/src/IcePack/IcePackNode.cpp b/cpp/src/IcePack/IcePackNode.cpp index 78a9316f365..f7c66acb086 100644 --- a/cpp/src/IcePack/IcePackNode.cpp +++ b/cpp/src/IcePack/IcePackNode.cpp @@ -376,7 +376,7 @@ main(int argc, char* argv[]) args = properties->parseCommandLineOptions("IcePack", args); Ice::stringSeqToArgs(args, argc, argv); - bool nowarn; + bool nowarn = false; for(int i = 1; i < argc; ++i) { if(strcmp(argv[i], "--nowarn") == 0) diff --git a/cpp/src/IcePack/ServerBuilder.cpp b/cpp/src/IcePack/ServerBuilder.cpp index 79697a883f0..d506bbd3cb6 100644 --- a/cpp/src/IcePack/ServerBuilder.cpp +++ b/cpp/src/IcePack/ServerBuilder.cpp @@ -690,6 +690,6 @@ IcePack::ServerBuilder::getServerAdapter(const std::string& id) const else { assert(false); + return 0; // Keep the compiler happy. } } - diff --git a/cpp/src/IcePack/ServerFactory.cpp b/cpp/src/IcePack/ServerFactory.cpp index 20858d3c3ae..30ccf7d2895 100644 --- a/cpp/src/IcePack/ServerFactory.cpp +++ b/cpp/src/IcePack/ServerFactory.cpp @@ -115,6 +115,7 @@ IcePack::ServerFactory::create(const string& type) else { assert(false); + return 0; // Keep the compiler happy. } } diff --git a/cpp/src/IcePack/ServerI.cpp b/cpp/src/IcePack/ServerI.cpp index a7bb93fa7c4..81bb4f649f3 100644 --- a/cpp/src/IcePack/ServerI.cpp +++ b/cpp/src/IcePack/ServerI.cpp @@ -229,7 +229,7 @@ IcePack::ServerI::destroy(const Ice::Current& current) void IcePack::ServerI::terminated(const Ice::Current&) { - ServerState newState; + ServerState newState = Inactive; // Initialize to keep the compiler happy. { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); @@ -408,7 +408,9 @@ IcePack::ServerI::stopInternal() { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); +#ifndef NDEBUG ServerState oldState = _state; +#endif while(true) { diff --git a/cpp/src/Yellow/Makefile b/cpp/src/Yellow/Makefile index 9ef9c083bc7..c65bc5f5bab 100644 --- a/cpp/src/Yellow/Makefile +++ b/cpp/src/Yellow/Makefile @@ -61,7 +61,7 @@ $(VERSIONED_SNAME): $(SERVICE_OBJS) rm -f $@ $(CXX) $(SHLIB_LDFLAGS) $(LDFLAGS) -o $@ $(SERVICE_OBJS) -$(ADMIN): $(AOBJS) +$(ADMIN): $(AOBJS) $(NAME) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(AOBJS) -lYellow $(LIBS) -lreadline -lcurses |