List:MySQL++« Previous MessageNext Message »
From:Carlos M. Gutierrez Date:July 21 2005 4:58pm
Subject:Beta 2: Warning when compiling program in FC4 GCC4
View as plain text  
I just installed 2.0.0 Beta 2 on a Fedora Core 4 system. I am getting the 
following warning:

/usr/local/include/mysql++/noexceptions.h: In member function 
mysqlpp::NoExceptions& mysqlpp::NoExceptions::operator=(const 
mysqlpp::NoExceptions&):
/usr/local/include/mysql++/noexceptions.h:129: warning: no return 
statement in function returning non-void


And the offending line of code seems to be at the end of:


private:
         OptionalExceptions& assoc_;
         bool exceptions_were_enabled_;

         // Hidden assignment operator and copy ctor, because we should not
         // be copied.
         NoExceptions(const NoExceptions&);
         NoExceptions& operator=(const NoExceptions&) { }

As defined in that last line, operator= should return a NoExceptions 
reference but it does not. I am not an expert programmer, should the "{ 
}" just become ";" ?

If not, what should I do? I am including mysqlpp as follows:

#include <mysql++.h>
Thread
m4 macro for mysql++?Pål Brattberg13 Jul
  • Re: m4 macro for mysql++?Warren Young13 Jul
    • Beta 2: Warning when compiling program in FC4 GCC4Carlos M. Gutierrez21 Jul
      • Re: Beta 2: Warning when compiling program in FC4 GCC4Carlos M. Gutierrez21 Jul
      • Re: Beta 2: Warning when compiling program in FC4 GCC4Chris Frey22 Jul
        • Re: Beta 2: Warning when compiling program in FC4 GCC4Warren Young22 Jul
          • Re: Beta 2: Warning when compiling program in FC4 GCC4Chris Frey22 Jul