Skip to content

Commit f032e3f

Browse files
authored
fix those particular gcc analyzer warning (#582)
1 parent 4e88b42 commit f032e3f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/snmalloc/ds_core/helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ namespace snmalloc
322322
append_char('-');
323323
s = 0 - s;
324324
}
325-
std::array<char, 20> buf;
325+
std::array<char, 20> buf{{0}};
326326
const char digits[] = "0123456789";
327327
for (long i = long(buf.size() - 1); i >= 0; i--)
328328
{
@@ -352,7 +352,7 @@ namespace snmalloc
352352
{
353353
append_char('0');
354354
append_char('x');
355-
std::array<char, 16> buf;
355+
std::array<char, 16> buf{{0}};
356356
const char hexdigits[] = "0123456789abcdef";
357357
// Length of string including null terminator
358358
static_assert(sizeof(hexdigits) == 0x11);

0 commit comments

Comments
 (0)