From: Olivier Houchard Date: Wed, 8 Jul 2026 17:13:10 +0000 (+0200) Subject: BUILD: haload: Increase a buffer size so that gcc will stop complaining X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/$%7BGITURL%7D/static//%22?a=commitdiff_plain;ds=inline;p=haproxy.git BUILD: haload: Increase a buffer size so that gcc will stop complaining gcc 16 whines that in human_number(), the calls to snprintf() could lead to a truncated output because the buffer is not big enough. This is not really true, because we always have a limited number of digits, but gcc can't figure that out, so just bump the buffer size from 5 bytes to 8 bytes to make gcc happy. --- diff --git a/src/haload.c b/src/haload.c index d0a644bba..6057d7978 100644 --- a/src/haload.c +++ b/src/haload.c @@ -477,7 +477,7 @@ static inline struct stconn *sc_new_from_hldstream(struct hldstream *hs, unsigne */ static const char *human_number(double x) { - static char str[5]; + static char str[8]; char unit = '.'; if (x < 0)