Fix compiler warnings
authorMyhailo Danylenko <isbear@ukrpost.net>
Tue, 30 Mar 2010 23:39:51 +0300
changeset 11 5bbf342f450a
parent 10 14987412be3b
child 12 9f7256ede8fc
Fix compiler warnings
CMakeLists.txt
yaubil.c
--- a/CMakeLists.txt	Thu Mar 25 21:03:23 2010 +0200
+++ b/CMakeLists.txt	Tue Mar 30 23:39:51 2010 +0300
@@ -38,6 +38,7 @@
 					  ${MCABBER_LIBRARIES})
 include_directories(${yaubil_SOURCE_DIR} 
                     ${yaubil_BINARY_DIR})
+set_target_properties(yaubil PROPERTIES COMPILE_FLAGS "-Wall")
 
 ## Packaging information
 set(CPACK_PACKAGE_NAME libmcabber-yaubil)
--- a/yaubil.c	Thu Mar 25 21:03:23 2010 +0200
+++ b/yaubil.c	Tue Mar 30 23:39:51 2010 +0300
@@ -21,6 +21,7 @@
 
 #include <glib.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include <mcabber/commands.h>
 #include <mcabber/compl.h>
@@ -163,6 +164,8 @@
 		l->str_value = res;
 	} else
 		return FALSE;
+	
+	return TRUE;
 }
 
 static gboolean op_tail (value_t *l, value_t *r)
@@ -202,6 +205,8 @@
 		l->str_value = res;
 	} else
 		return FALSE;
+	
+	return TRUE;
 }
 
 static gboolean op_plus (value_t *l, value_t *r)
@@ -800,7 +805,6 @@
 
 static void do_let (char *arg)
 {
-	char     *varname;
 	value_t  *value;
 	int       namelen;
 	char     *val     = strchr (arg, '=');