Explorar o código

Ensure GCC that p is not used uninitialized

Kristoffer Grönlund %!s(int64=11) %!d(string=hai) anos
pai
achega
f298f7dabe
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;