From 74bb899ce2a3f8965a4a005a4201c2977dc0fd56 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 12 Dec 2018 17:06:36 +0100 Subject: [PATCH] mindtct: Fix "garbage value" error in dft_dir_powers() libfprint/nbis/mindtct/dft.c:212:30: warning: The left operand of '*' is a garbage value cospart += (rowsums[i] * wave->cos[i]); ~~~~~~~~~~ ^ --- libfprint/nbis/mindtct/dft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfprint/nbis/mindtct/dft.c b/libfprint/nbis/mindtct/dft.c index 0cc490a..be48586 100644 --- a/libfprint/nbis/mindtct/dft.c +++ b/libfprint/nbis/mindtct/dft.c @@ -118,6 +118,7 @@ int dft_dir_powers(double **powers, unsigned char *pdata, fprintf(stderr, "ERROR : dft_dir_powers : malloc : rowsums\n"); return(-91); } + memset(rowsums, 0, dftgrids->grid_w * sizeof(int)); /* Foreach direction ... */ for(dir = 0; dir < dftgrids->ngrids; dir++){