main/say: Work around gcc 9 format-truncation false positive
Version: gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0 Warning: say.c:2371:24: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 10 [-Werror=format-truncation=] 2371 | snprintf(buf, 10, "%d", num); say.c:2371:23: note: directive argument in the range [-2147483648, 9] That's not possible though, as the if() starts out checking for (num < 0), making this Warning a false positive. (Also replaced some else<TAB>if with else<SP>if while in the vicinity.) Change-Id: Ic7a70120188c9aa525a6d70289385bfce878438a
parent
c62193c5
No related branches found
No related tags found
Loading
Please register or sign in to comment