1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 23:46:14 +00:00

Static analysis suggests (incorrectly) that a reference *srcbase accesses uninitialized memory in grayword.

Correct its misunderstanding by explicitly initializing all elements of grayword[4] to 0.
This commit is contained in:
Nick Briggs 2022-12-14 19:02:32 -08:00
parent d5acdf7ea4
commit 38bf60c626

View File

@ -332,7 +332,7 @@ void bitbltsub(LispPTR *argv) {
int backwardflg = 0, sx, dx, srcbpl=2147483647, dstbpl, src_comp, op;
DLword *srcbase, *dstbase;
int gray = 0, num_gray = 0, curr_gray_line = 0;
DLword grayword[4];
DLword grayword[4] = {0, 0, 0, 0};
{ /* Initialization code, in a block so it optimizes independently */
LispPTR *args = argv;
@ -914,7 +914,7 @@ LispPTR bitshade_bitmap(LispPTR *args) {
#endif
int rasterwidth;
int num_gray, curr_gray_line;
DLword grayword[4];
DLword grayword[4] = {0, 0, 0, 0};
texture = args[0];
{