mirror of https://github.com/OISF/suricata
eve/stats: work around format truncation warnings
This appears to be a FP. Work around it to allow for using this warning
as an error.
output-json-stats.c: In function 'StatsToJSON':
output-json-stats.c:253:65: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
253 | snprintf(deltaname, sizeof(deltaname), "%s%s", stat_name, delta_suffix);
| ^
output-json-stats.c:253:21: note: 'snprintf' output 1 or more bytes (assuming 8) into a destination of size 7
253 | snprintf(deltaname, sizeof(deltaname), "%s%s", stat_name, delta_suffix);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
output-json-stats.c:314:69: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
314 | snprintf(deltaname, sizeof(deltaname), "%s%s", stat_name, delta_suffix);
| ^
output-json-stats.c:314:25: note: 'snprintf' output 1 or more bytes (assuming 8) into a destination of size 7
314 | snprintf(deltaname, sizeof(deltaname), "%s%s", stat_name, delta_suffix);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ticket: #7905.
pull/13926/head
parent
a57643c70b
commit
99a79b595f
Loading…
Reference in New Issue