[rtems commit] testsuite: Fix warnings

Chris Johns chrisj at rtems.org
Thu Aug 4 21:48:24 UTC 2022


Module:    rtems
Branch:    master
Commit:    c36d6080796cf5ae0a8b2db7e07e20bfae11fbea
Changeset: http://git.rtems.org/rtems/commit/?id=c36d6080796cf5ae0a8b2db7e07e20bfae11fbea

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Aug  5 07:51:43 2022 +1000

testsuite: Fix warnings

Updates #4662

---

 testsuites/fstests/tftpfs/init.c | 2 +-
 testsuites/libtests/POSIX/free.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/testsuites/fstests/tftpfs/init.c b/testsuites/fstests/tftpfs/init.c
index fe18476ef3..94e0242564 100644
--- a/testsuites/fstests/tftpfs/init.c
+++ b/testsuites/fstests/tftpfs/init.c
@@ -919,7 +919,7 @@ T_TEST_CASE( tftp_read_null_buffer )
  */
 T_TEST_CASE( tftp_write_null_tftp_handle )
 {
-  char data_buffer[10];
+  char data_buffer[10] = { 0 };
   ssize_t res;
 
   res = tftp_write(
diff --git a/testsuites/libtests/POSIX/free.c b/testsuites/libtests/POSIX/free.c
index 8550eaa85c..246415ce65 100644
--- a/testsuites/libtests/POSIX/free.c
+++ b/testsuites/libtests/POSIX/free.c
@@ -12,9 +12,10 @@
 
 #include <stdlib.h>
 
+void* p;
+
 int main (void)
 {
-  free((void *) 42);
-
+  free(p);
   return 0;
 }



More information about the vc mailing list