knl_cray plugin - increase output buffer to silence warning.
GCC-7 with -Wformat warns about
node_features_knl_cray.c:2869:33: warning: ‘%d’ directive output may be
truncated writing between 1 and 10 bytes into a region of size 8
[-Wformat-truncation=]
snprintf(buf, sizeof(buf), "%d", i);
^~
node_features_knl_cray.c:2869:32: note: directive argument in the
range [0, 2147483647]
snprintf(buf, sizeof(buf), "%d", i);
^~~~
In file included from /usr/include/stdio.h:862:0,
from ../../../../slurm/slurm.h:68,
from node_features_knl_cray.c:66:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’
output between 2 and 11 bytes into a destination of size 8
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Increasing the buffer to 12 for this.
Bug 4900.
Signed-off-by:
Justin Lecher <jlec@gentoo.org>
Please register or sign in to comment