From: DRC Date: Tue, 12 Feb 2019 04:43:15 +0000 (-0600) Subject: tjbench.c: Fix GCC 8 compiler warning X-Git-Tag: 2.0.2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=031e16ecffd21c6d648bbd94e222146cb1a24f1a;p=libjpeg-turbo tjbench.c: Fix GCC 8 compiler warning --- diff --git a/tjbench.c b/tjbench.c index 0eb41d5..0ddcd7b 100644 --- a/tjbench.c +++ b/tjbench.c @@ -139,7 +139,7 @@ int decomp(unsigned char *srcBuf, unsigned char **jpegBuf, unsigned long *jpegSize, unsigned char *dstBuf, int w, int h, int subsamp, int jpegQual, char *fileName, int tilew, int tileh) { - char tempStr[1024], sizeStr[20] = "\0", qualStr[6] = "\0", *ptr; + char tempStr[1024], sizeStr[20] = "\0", qualStr[13] = "\0", *ptr; FILE *file = NULL; tjhandle handle = NULL; int row, col, iter = 0, dstBufAlloc = 0, retval = 0; @@ -152,8 +152,8 @@ int decomp(unsigned char *srcBuf, unsigned char **jpegBuf, unsigned char *dstPtr, *dstPtr2, *yuvBuf = NULL; if (jpegQual > 0) { - snprintf(qualStr, 6, "_Q%d", jpegQual); - qualStr[5] = 0; + snprintf(qualStr, 13, "_Q%d", jpegQual); + qualStr[12] = 0; } if ((handle = tjInitDecompress()) == NULL)