Hey,

On Sat, Aug 27, 2005 at 07:01:22AM +0100, kannel wrote:
> Kannel compilation test.
> Output of 'make -s':
> gw/wap-appl.c: In function `normalize_charset':
> gw/wap-appl.c:707: warning: suggest explicit braces to avoid ambiguous `else'
> gw/wml_compiler.c: In function `wml_compile':
> gw/wml_compiler.c:364: warning: implicit declaration of function 
> `xmlReadMemory'
> gw/wml_compiler.c:364: `XML_PARSE_RECOVER' undeclared (first use in this 
> function)
> gw/wml_compiler.c:364: (Each undeclared identifier is reported only once
> gw/wml_compiler.c:364: for each function it appears in.)
> gw/wml_compiler.c:364: `XML_PARSE_NONET' undeclared (first use in this 
> function)
> gw/wml_compiler.c:364: warning: assignment makes pointer from integer without 
> a cast
> make: *** [gw/wml_compiler.o] Error 1

I have been receiving these for a while now, and although I could not
duplicate the error here on my development server running Debian/sarge
and gcc-3.3.5 I think attached trivial patch will get rid of these
warnings.

Thanks,
-- 
Enver
Index: wap-appl.c
===================================================================
RCS file: /home/cvs/gateway/gw/wap-appl.c,v
retrieving revision 1.115
diff -u -p -d -u -p -d -r1.115 wap-appl.c
--- wap-appl.c  12 Aug 2005 14:11:27 -0000      1.115
+++ wap-appl.c  27 Aug 2005 09:52:53 -0000
@@ -704,12 +704,13 @@ static void normalize_charset(struct con
 {
     Octstr* charset;
 
-    if ((charset = find_charset_encoding(content->body)) == NULL)
+    if ((charset = find_charset_encoding(content->body)) == NULL) {
         if (octstr_len(content->charset) > 0) {
             charset = octstr_duplicate(content->charset);
         } else {
             charset = octstr_imm("UTF-8");
         }
+       }
 
     debug("wap-appl",0,"Normalizing charset from %s", 
octstr_get_cstr(charset));
 
Index: wml_compiler.c
===================================================================
RCS file: /home/cvs/gateway/gw/wml_compiler.c,v
retrieving revision 1.120
diff -u -p -d -u -p -d -r1.120 wml_compiler.c
--- wml_compiler.c      12 Aug 2005 14:11:27 -0000      1.120
+++ wml_compiler.c      27 Aug 2005 09:52:53 -0000
@@ -78,6 +78,7 @@
 #include <libxml/tree.h>
 #include <libxml/debugXML.h>
 #include <libxml/encoding.h>
+#include <libxml/parser.h>
 
 #include "gwlib/gwlib.h"
 #include "wml_compiler.h"

Reply via email to