Преглед изворни кода

Ensure GCC that p is not used uninitialized

Kristoffer Grönlund пре 11 година
родитељ
комит
f298f7dabe
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      stb.h

+ 1 - 1
stb.h

@@ -2771,7 +2771,7 @@ static void * malloc_base(void *context, size_t size, stb__alloc_type t, int ali
          break;
       }
 
-      default: assert(0); /* NOTREACHED */
+      default: p = NULL; assert(0); /* NOTREACHED */
    }
 
    ++stb_alloc_count_alloc;