Page 1 of 1

openSUSE build errors

Posted: Thu Mar 11, 2010 7:08 pm
by malcolmlewis
Hi
I have packaged up version 1.0.5 for use on openSUSE 11.2 with the openSUSE build service. I had to patch the CMakeLists.txt to place the files in /usr/bin and /usr/share. But it's unable to pass the final build service checks with the following errors;

Code: Select all

E: mudlet no-return-in-nonvoid-function /usr/src/packages/BUILD/mudlet-1.0.5/src/TConsole.cpp:1444
E: mudlet no-return-in-nonvoid-function /usr/src/packages/BUILD/mudlet-1.0.5/src/TLuaInterpreter.cpp:2303
E: mudlet no-return-in-nonvoid-function /usr/src/packages/BUILD/mudlet-1.0.5/src/TTrigger.cpp:902
Now my googling show that adding a `return 0;' will probably silence the warning. I'm not a coder, but have patched the files in question like so, which enables building;

Code: Select all

--- src/TTrigger.cpp	2009-12-16 16:02:49.000000000 -0600
+++ src/TTrigger.cpp.orig	2010-03-11 12:29:27.000000000 -0600
@@ -899,6 +899,7 @@
     }
     else
         return true; //line spacers don't make sense outside of AND triggers -> ignore them
+	return 0;
 }
 
 bool TTrigger::match_lua_code( int regexNumber )

--- src/TLuaInterpreter.cpp	2009-12-16 16:02:49.000000000 -0600
+++ src/TLuaInterpreter.cpp.orig	2010-03-11 11:46:58.000000000 -0600
@@ -2300,6 +2300,7 @@
         luaSendText = lua_tostring( L, 1 );
     }
     QSound::play( QString( luaSendText.c_str() ) );
+    return 0;
 }
 
 int TLuaInterpreter::moveCursorEnd( lua_State *L )
--- src/TTrigger.cpp	2009-12-16 16:02:49.000000000 -0600
+++ src/TTrigger.cpp.orig	2010-03-11 12:29:27.000000000 -0600
@@ -899,6 +899,7 @@
     }
     else
         return true; //line spacers don't make sense outside of AND triggers -> ignore them
+	return 0;
 }
 
 bool TTrigger::match_lua_code( int regexNumber )
So are the above patches acceptable???

Kind Regards
Malcolm

Re: openSUSE build errors

Posted: Thu Mar 11, 2010 8:17 pm
by Heiko
That's alright.

Re: openSUSE build errors

Posted: Fri Mar 12, 2010 4:48 am
by malcolmlewis
Hi
Thanks :D

Kind Regards
Malcolm