]> granicus.if.org Git - postgresql/commitdiff
Suppress 'uninitialized variable' warning emitted by some (not all)
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 13:09:12 +0000 (13:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 13:09:12 +0000 (13:09 +0000)
versions of gcc.  The code is correct AFAICS, but it requires slightly
more analysis than usual to see that the variable can't be used uninitialized.

contrib/tsearch2/ispell/spell.c

index 10b0ca9e40ac5fdb18f2e100e63179d20b612891..416acf77974b29d4bd28d040465b1974a22975b0 100644 (file)
@@ -791,7 +791,7 @@ CopyVar(SplitVar *s, int makedup) {
 static SplitVar*
 SplitToVariants( IspellDict * Conf, SPNode *snode, SplitVar * orig, char *word, int wordlen, int startpos, int minpos ) {
        SplitVar *var=NULL;
-       SPNodeData *StopLow, *StopHigh, *StopMiddle;
+       SPNodeData *StopLow, *StopHigh, *StopMiddle = NULL;
        SPNode *node = (snode) ? snode : Conf->Dictionary;
        int level=(snode) ? minpos : startpos; /* recursive minpos==level*/
        int lenaff;