tif_lzw.c: avoid false positive -Wnull-dereference of mingw32 gcc 7.3

This commit is contained in:
Even Rouault 2020-11-20 14:12:38 +01:00
parent dadd8c7dce
commit 69c6b52663
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -214,19 +214,16 @@ LZWSetupDecode(TIFF* tif)
return (0);
}
DecoderState(tif)->dec_codetab = NULL;
DecoderState(tif)->dec_decode = NULL;
sp = DecoderState(tif);
sp->dec_codetab = NULL;
sp->dec_decode = NULL;
/*
* Setup predictor setup.
*/
(void) TIFFPredictorInit(tif);
sp = DecoderState(tif);
}
assert(sp != NULL);
if (sp->dec_codetab == NULL) {
sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
if (sp->dec_codetab == NULL) {