plotPNM.c: warning: variable 'strip' is used uninitialized
The compiler warning concerns the use of 'goto done;' has cleanup that accesses 'strip' before initialization. While evaluating this I also notice the other 2 variables 'rtile' and 'lkstep' are globals, but their pointers are not invalidated at the time of free. plotPNM.c:821:6: warning: variable 'strip' is used uninitialized whenever 'if' condition is true clang18 -Wall warning cleanup [-Wsometimes-uninitialized]
This commit is contained in:
parent
60e78f4ab4
commit
1bb6a7f6c5
|
|
@ -582,7 +582,7 @@ PlotPNM(fileName, scx, layers, xMask, width)
|
||||||
int i, x, y, tile_ydelta;
|
int i, x, y, tile_ydelta;
|
||||||
int save_ds, iter;
|
int save_ds, iter;
|
||||||
int scale_over_2, ds_over_2;
|
int scale_over_2, ds_over_2;
|
||||||
float *strip;
|
float *strip = NULL;
|
||||||
float scale, invscale, scaledown, normal;
|
float scale, invscale, scaledown, normal;
|
||||||
|
|
||||||
#ifdef VERSATEC
|
#ifdef VERSATEC
|
||||||
|
|
@ -937,8 +937,10 @@ PlotPNM(fileName, scx, layers, xMask, width)
|
||||||
done:
|
done:
|
||||||
PlotPNMdownsample = save_ds;
|
PlotPNMdownsample = save_ds;
|
||||||
freeMagic(rtile);
|
freeMagic(rtile);
|
||||||
|
rtile = NULL;
|
||||||
freeMagic(strip);
|
freeMagic(strip);
|
||||||
freeMagic(lkstep);
|
freeMagic(lkstep);
|
||||||
|
lkstep = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue