"Serge E. Hallyn" [off-list ref] writes:
Argh, I had to pull out a sheet of paper, but you are right. I
misread, and the warning must be about the case where the
snprint "[%ld] " prints out 1023 characters.
If snprintf(buf, sizeof(buf), "[%ld] ", (long) getpid()) is
judged to possibly overrun the buffer by your static analysis
tool, I think the tool is broken. It at least should know how
big a printed long can be. It would earn bonus points if it can
warn me when sizeof(buf) is sufficiently small, say 40 bytes,
with a message like "on future architectures with 128-bit long
this code might break" ;-).