[PATCH v2 5/6] testsuites/libtests/POSIX/free.c: fix warning

Matthew Joyce matthew.joyce at embedded-brains.de
Fri Jun 10 13:34:58 UTC 2022


From: Matt Joyce <matthew.joyce at embedded-brains.de>

This change fixes a new warning in gcc 12.

Updates #4662
---
 testsuites/libtests/POSIX/free.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/libtests/POSIX/free.c b/testsuites/libtests/POSIX/free.c
index 8550eaa85c..6bc961b968 100644
--- a/testsuites/libtests/POSIX/free.c
+++ b/testsuites/libtests/POSIX/free.c
@@ -14,7 +14,7 @@
 
 int main (void)
 {
-  free((void *) 42);
+  free(NULL);
 
   return 0;
 }
-- 
2.31.1



More information about the devel mailing list