Browse Source

Ensure GCC that p is not used uninitialized

Kristoffer Grönlund 11 năm trước cách đây
mục cha
commit
f298f7dabe
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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;