瀏覽代碼

fix warning about ignoring return value of realloc

Mike Frysinger 19 年之前
父節點
當前提交
dacafa9527
共有 1 個文件被更改,包括 4 次插入1 次删除
  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;