static analyzer bit in mklev.c
src/mklev.c(137): warning: Using uninitialized memory 'ri'. There was a for-loop assigning values to some elements of ri[], but not all of them. Initialize the array.
This commit is contained in:
@@ -120,7 +120,7 @@ void
|
||||
sort_rooms(void)
|
||||
{
|
||||
coordxy x, y;
|
||||
unsigned i, ri[MAXNROFROOMS + 1], n = (unsigned) gn.nroom;
|
||||
unsigned i, ri[MAXNROFROOMS + 1] = { 0U }, n = (unsigned) gn.nroom;
|
||||
|
||||
qsort((genericptr_t) gr.rooms, n, sizeof (struct mkroom), mkroom_cmp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user