This was found by newer version of gcc warnings.
pool_config_variables.c: In function ‘BackendFlagsShowFunc’:
pool_config_variables.c:3809:57: warning: ‘__builtin_snprintf’ output truncated before the last format character [-Wformat-truncation=]
snprintf(buffer, sizeof(buffer), "DISALLOW_TO_FAILOVER");
^
In file included from /usr/include/stdio.h:862:0,
from pool_config_variables.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin_snprintf’ output 21 bytes into a destination of size 20
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static const char* BackendFlagsShowFunc(int index)
{
- static char buffer[20];
+ static char buffer[21];
unsigned short flag = g_pool_config.backend_desc->backend_info[index].flag;
if (POOL_ALLOW_TO_FAILOVER(flag))