Avoid bogus -Wmaybe-uninitialized from gcc 11
It doesn't really matter that number_buf is not initialized because its first characters are not going to be used anyhow (png_format_number() returns a pointer to the actually used part of the string at the end), but gcc-11 warns about it, so do initialize it just to make it happy.
This commit is contained in:
parent
9853c67ab4
commit
dc6985f9d2
2
png.c
2
png.c
@ -752,7 +752,7 @@ png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime)
|
||||
|
||||
{
|
||||
size_t pos = 0;
|
||||
char number_buf[5]; /* enough for a four-digit year */
|
||||
char number_buf[5] = {0}; /* enough for a four-digit year */
|
||||
|
||||
# define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string))
|
||||
# define APPEND_NUMBER(format, value)\
|
||||
|
Loading…
Reference in New Issue
Block a user