LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fix-uninit.patch of Package canna (Project DISCONTINUED:openSUSE:11.1)

--- lib/canna/lisp.c
+++ lib/canna/lisp.c
@@ -86,7 +86,7 @@
 
 /* error functions	*/
 
-static void	argnerr(), numerr(), error();
+static void	argnerr(), numerr(), error() __attribute__((noreturn));
 
 /* multiple values */
 
@@ -3511,10 +3511,9 @@
     *dptr++ = '\0';
     return tdptr;
   }
-  else {
-    error("Insufficient memory", NON);
-    /* NOTREACHED */
-  }
+  error("Insufficient memory", NON);
+  /* NOTREACHED */
+  return NULL;
 }
 
 /* 
--- lib/canna/multi.c
+++ lib/canna/multi.c
@@ -134,9 +134,9 @@
 BYTE key;
 {
   int res, total_res, ginfo = 0;
-  int prevEchoLen = -1, prevRevPos, prevRevLen;
-  int prevGEchoLen, prevGRevPos, prevGRevLen;
-  wchar_t *prevEcho, *prevGEcho;
+  int prevEchoLen = -1, prevRevPos = -1, prevRevLen = -1;
+  int prevGEchoLen = -1, prevGRevPos = -1, prevGRevLen = -1;
+  wchar_t *prevEcho = NULL, *prevGEcho = NULL;
   BYTE *p, *actFromHash();
   wchar_t *malloc_echo = (wchar_t *)0, *malloc_gline = (wchar_t *)0;