Browse Source

fix warning about ignoring return value of realloc

Mike Frysinger 20 năm trước cách đây
mục cha
commit
dacafa9527
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      test/malloc/testmalloc.c

+ 4 - 1
test/malloc/testmalloc.c

@@ -67,7 +67,10 @@ int main(void)
 			goto Failed;
 		}
 	}
-	realloc(lp, 0);
+	{
+	void *unused_ret = realloc(lp, 0);
+	(void) unused_ret;
+	}
 	
 	printf("Allocate another 100 nodes 600 bytes each\n");
 	save = 0;