Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: silence a compiler warning



Here's a patch to silence the "potentially used uninitialized"
warning in Src/pattern.c.  (I also had a patch for Zle/computil.c,
but it looks like Sven already fixed that one in the same way I did.)

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/pattern.c
@@ -807,7 +807,7 @@
 static long
 patcomppiece(int *flagp)
 {
-    long starter, next, pound, op;
+    long starter = 0, next, pound, op;
     int flags, flags2, kshchar, len, ch, patch;
     union upat up;
     char *nptr, *str0, cbuf[2];
@@ -1025,7 +1025,6 @@
 	    if (*patparse != Outang)
 		return 0;
 	    patparse++;
-	    starter = 0;	/* shut compiler up */
 	    switch(len) {
 	    case 3:
 		starter = patnode(P_NUMRNG);
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



Messages sorted by: Reverse Date, Date, Thread, Author