[PATCH v1 10/12] ttest01/test-checks.c: Initialize variables

Ryan Long ryan.long at oarcorp.com
Tue Aug 16 20:11:58 UTC 2022


These uninitialized variables were causing warnings to be generated.

Updates #4662
---
 testsuites/libtests/ttest01/test-checks.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuites/libtests/ttest01/test-checks.c b/testsuites/libtests/ttest01/test-checks.c
index fa5591121e..06e1a959bf 100644
--- a/testsuites/libtests/ttest01/test-checks.c
+++ b/testsuites/libtests/ttest01/test-checks.c
@@ -90,8 +90,8 @@ T_TEST_CASE(step_assert_eq_ptr)
 
 T_TEST_CASE(check_eq_ptr)
 {
-	int a;
-	int b;
+	int a = 0;
+	int b = 0;
 
 	T_eq_ptr(&a, &a);
 	T_eq_ptr(&a, &b);
@@ -115,8 +115,8 @@ T_TEST_CASE(step_assert_ne_ptr)
 
 T_TEST_CASE(check_ne_ptr)
 {
-	int a;
-	int b;
+	int a = 0;
+	int b = 0;
 
 	T_ne_ptr(&a, &b);
 	T_ne_ptr(&a, &a);
@@ -162,7 +162,7 @@ T_TEST_CASE(step_assert_not_null)
 
 T_TEST_CASE(check_not_null)
 {
-	int a;
+	int a = 0;
 
 	T_not_null(&a);
 	T_not_null(NULL);
-- 
2.11.0



More information about the devel mailing list