From b69cea0e182525f1b89503291ccdfd132fa3cddb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 4 Aug 2015 22:36:16 +0300 Subject: Update test 42. Update test results. --- test/test07-04.txt | 1 + test/test07-05.txt | 1 + test/test11-03.txt | 5 +++++ test/test11-04.txt | 5 +++++ test/test12-03.txt | 2 ++ test/test12-04.txt | 2 ++ test/test16-03.txt | 5 +++++ test/test16-04.txt | 5 +++++ test/test17-03.txt | 3 +++ test/test17-04.txt | 3 +++ test/test18-03.txt | 2 ++ test/test18-04.txt | 2 ++ test/test19-03.txt | 6 +++++ test/test19-04.txt | 6 +++++ test/test20-03.txt | 6 +++++ test/test20-04.txt | 6 +++++ test/test27-03.txt | 28 +++++++++++++++++++++++ test/test27-04.txt | 28 +++++++++++++++++++++++ test/test27-05.txt | 28 +++++++++++++++++++++++ test/test33-03.txt | 3 +++ test/test33-04.txt | 3 +++ test/test33-05.txt | 3 +++ test/test34-03.txt | 2 ++ test/test34-04.txt | 2 ++ test/test34-05.txt | 2 ++ test/test39-03.txt | 2 ++ test/test39-04.txt | 2 ++ test/test39-05.txt | 2 ++ test/test42-01.txt | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ test/test42-02.txt | 1 + test/test42-03.txt | 24 ++++++++++++++++++++ test/test42-04.txt | 4 ++++ test/test42-05.txt | 4 ++++ test/test42.cpp | 2 +- 34 files changed, 265 insertions(+), 1 deletion(-) diff --git a/test/test07-04.txt b/test/test07-04.txt index a21efb7..418f8d8 100644 --- a/test/test07-04.txt +++ b/test/test07-04.txt @@ -6,3 +6,4 @@ test07.cpp: In member function 'void Object1::func5(Struct1*)': test07.cpp:43:22: warning: Using parameter 'sptr' without checking for null pointer sptr->num = 0; ^ +test07.cpp:43:22: warning: Using field 'sptr' without checking for null pointer diff --git a/test/test07-05.txt b/test/test07-05.txt index 10407b8..31d04e3 100644 --- a/test/test07-05.txt +++ b/test/test07-05.txt @@ -9395,6 +9395,7 @@ test07.cpp: In member function 'void Object1::func5(Struct1*)': test07.cpp:43:22: warning: Using parameter 'sptr' without checking for null pointer sptr->num = 0; ^ +test07.cpp:43:22: warning: Using field 'sptr' without checking for null pointer component_ref : sptr, indirect_ref : sptr, parm_decl sptr: sptr, diff --git a/test/test11-03.txt b/test/test11-03.txt index 8bdd134..30bf1af 100644 --- a/test/test11-03.txt +++ b/test/test11-03.txt @@ -105,6 +105,7 @@ test11.cpp: In member function 'void Object1::func2(Data1*, Data1*)': test11.cpp:29:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test11.cpp:29:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -161,6 +162,7 @@ modify_expr : ptr1, ptr2, test11.cpp:39:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test11.cpp:39:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -217,6 +219,7 @@ modify_expr : ptr1, ptr2, test11.cpp:49:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test11.cpp:49:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -392,6 +395,7 @@ test11.cpp: In member function 'void Object1::func6(Data1*, Data1*)': test11.cpp:70:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test11.cpp:70:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -414,6 +418,7 @@ modify_expr : ptr1, ptr2, test11.cpp:71:24: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 400; ^ +test11.cpp:71:24: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr2: ptr1, ptr2, diff --git a/test/test11-04.txt b/test/test11-04.txt index b9c8a09..c710a41 100644 --- a/test/test11-04.txt +++ b/test/test11-04.txt @@ -2,6 +2,7 @@ test11.cpp: In member function 'void Object1::func2(Data1*, Data1*)': test11.cpp:29:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test11.cpp:29:24: warning: Using field 'ptr1' without checking for null pointer test11.cpp: In member function 'void Object1::func3(Data1*, Data1*)': test11.cpp:34:31: warning: Using field 'ptr1' without checking for null pointer if (ptr1 || ptr1->val == 100) @@ -9,6 +10,7 @@ test11.cpp:34:31: warning: Using field 'ptr1' without checking for null pointer test11.cpp:39:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test11.cpp:39:24: warning: Using field 'ptr1' without checking for null pointer test11.cpp: In member function 'void Object1::func4(Data1*, Data1*)': test11.cpp:44:32: warning: Using field 'ptr1' without checking for null pointer if (!ptr1 && ptr1->val == 100) @@ -16,10 +18,13 @@ test11.cpp:44:32: warning: Using field 'ptr1' without checking for null pointer test11.cpp:49:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test11.cpp:49:24: warning: Using field 'ptr1' without checking for null pointer test11.cpp: In member function 'void Object1::func6(Data1*, Data1*)': test11.cpp:70:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test11.cpp:70:24: warning: Using field 'ptr1' without checking for null pointer test11.cpp:71:24: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 400; ^ +test11.cpp:71:24: warning: Using field 'ptr2' without checking for null pointer diff --git a/test/test12-03.txt b/test/test12-03.txt index 2b928de..0dfedbb 100644 --- a/test/test12-03.txt +++ b/test/test12-03.txt @@ -382,6 +382,7 @@ modify_expr : ptr1, ptr2, test12.cpp:30:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test12.cpp:30:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -404,6 +405,7 @@ modify_expr : ptr1, ptr2, test12.cpp:34:28: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 300; ^ +test12.cpp:34:28: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr2: ptr1, ptr2, diff --git a/test/test12-04.txt b/test/test12-04.txt index dc168ef..6f02bd5 100644 --- a/test/test12-04.txt +++ b/test/test12-04.txt @@ -38,9 +38,11 @@ test12.cpp:28:35: warning: Using parameter 'ptr2' without checking for null poin test12.cpp:30:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test12.cpp:30:28: warning: Using field 'ptr1' without checking for null pointer test12.cpp:34:28: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 300; ^ +test12.cpp:34:28: warning: Using field 'ptr2' without checking for null pointer test12.cpp: In member function 'void Object1::func5(Data1*, Data1*)': test12.cpp:40:41: warning: Using parameter 'ptr2' without checking for null pointer int tmp = (ptr1 ? ptr1 : ptr2)->val; diff --git a/test/test16-03.txt b/test/test16-03.txt index a19bc8d..a5741b7 100644 --- a/test/test16-03.txt +++ b/test/test16-03.txt @@ -99,6 +99,7 @@ test16.c: In function 'func2': test16.c:26:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test16.c:26:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -154,6 +155,7 @@ modify_expr : ptr1, ptr2, test16.c:36:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test16.c:36:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -209,6 +211,7 @@ modify_expr : ptr1, ptr2, test16.c:46:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test16.c:46:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -379,6 +382,7 @@ test16.c: In function 'func6': test16.c:67:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test16.c:67:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -398,6 +402,7 @@ modify_expr : ptr1, ptr2, test16.c:68:15: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 400; ^ +test16.c:68:15: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr2: ptr1, ptr2, diff --git a/test/test16-04.txt b/test/test16-04.txt index 32366cb..268d81f 100644 --- a/test/test16-04.txt +++ b/test/test16-04.txt @@ -2,6 +2,7 @@ test16.c: In function 'func2': test16.c:26:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test16.c:26:15: warning: Using field 'ptr1' without checking for null pointer test16.c: In function 'func3': test16.c:31:27: warning: Using field 'ptr1' without checking for null pointer if (ptr1 || ptr1->val == 100) @@ -9,6 +10,7 @@ test16.c:31:27: warning: Using field 'ptr1' without checking for null pointer test16.c:36:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test16.c:36:15: warning: Using field 'ptr1' without checking for null pointer test16.c: In function 'func4': test16.c:41:28: warning: Using field 'ptr1' without checking for null pointer if (!ptr1 && ptr1->val == 100) @@ -16,10 +18,13 @@ test16.c:41:28: warning: Using field 'ptr1' without checking for null pointer test16.c:46:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test16.c:46:15: warning: Using field 'ptr1' without checking for null pointer test16.c: In function 'func6': test16.c:67:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test16.c:67:15: warning: Using field 'ptr1' without checking for null pointer test16.c:68:15: warning: Using parameter 'ptr2' without checking for null pointer ptr2->val = 400; ^ +test16.c:68:15: warning: Using field 'ptr2' without checking for null pointer diff --git a/test/test17-03.txt b/test/test17-03.txt index 8b266a8..6c845ab 100644 --- a/test/test17-03.txt +++ b/test/test17-03.txt @@ -69,6 +69,7 @@ modify_expr : ptr1, ptr2, test17.c:20:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:20:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -127,6 +128,7 @@ modify_expr : ptr1, ptr2, test17.c:28:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:28:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -182,6 +184,7 @@ test17.c: In function 'func4': test17.c:40:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:40:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, diff --git a/test/test17-04.txt b/test/test17-04.txt index b0d2277..162a307 100644 --- a/test/test17-04.txt +++ b/test/test17-04.txt @@ -5,6 +5,7 @@ test17.c:18:14: warning: comparison between pointer and integer test17.c:20:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:20:15: warning: Using field 'ptr1' without checking for null pointer test17.c: In function 'func3': test17.c:26:14: warning: comparison between pointer and integer if (ptr1 != (123, 0)) @@ -12,7 +13,9 @@ test17.c:26:14: warning: comparison between pointer and integer test17.c:28:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:28:15: warning: Using field 'ptr1' without checking for null pointer test17.c: In function 'func4': test17.c:40:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test17.c:40:15: warning: Using field 'ptr1' without checking for null pointer diff --git a/test/test18-03.txt b/test/test18-03.txt index 8a28859..9573ffd 100644 --- a/test/test18-03.txt +++ b/test/test18-03.txt @@ -117,6 +117,7 @@ test18.cpp: In function 'int func3(Data1*, Data1*)': test18.cpp:28:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test18.cpp:28:20: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -173,6 +174,7 @@ test18.cpp: In function 'void func4(Data1*, Data1*)': test18.cpp:40:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test18.cpp:40:20: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, diff --git a/test/test18-04.txt b/test/test18-04.txt index 6838f0c..d02a600 100644 --- a/test/test18-04.txt +++ b/test/test18-04.txt @@ -2,7 +2,9 @@ test18.cpp: In function 'int func3(Data1*, Data1*)': test18.cpp:28:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test18.cpp:28:20: warning: Using field 'ptr1' without checking for null pointer test18.cpp: In function 'void func4(Data1*, Data1*)': test18.cpp:40:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test18.cpp:40:20: warning: Using field 'ptr1' without checking for null pointer diff --git a/test/test19-03.txt b/test/test19-03.txt index 2f273c5..916e041 100644 --- a/test/test19-03.txt +++ b/test/test19-03.txt @@ -54,6 +54,7 @@ test19.cpp: In function 'int func2(Data1*, Data1*)': test19.cpp:16:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test19.cpp:16:20: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -423,6 +424,7 @@ test19.cpp: In function 'int func6(Data1*, Data1*)': test19.cpp:52:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test19.cpp:52:20: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -536,6 +538,7 @@ test19.cpp: In function 'int func7(Data1*, Data1*)': test19.cpp:66:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test19.cpp:66:20: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -558,6 +561,7 @@ modify_expr : ptr1, ptr2, ptr3, test19.cpp:67:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test19.cpp:67:20: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -675,6 +679,7 @@ test19.cpp: In function 'int func8(Data1*, Data1*)': test19.cpp:81:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test19.cpp:81:20: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -697,6 +702,7 @@ modify_expr : ptr1, ptr2, ptr3, test19.cpp:82:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test19.cpp:82:20: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, diff --git a/test/test19-04.txt b/test/test19-04.txt index 35edc94..c2de4e8 100644 --- a/test/test19-04.txt +++ b/test/test19-04.txt @@ -2,6 +2,7 @@ test19.cpp: In function 'int func2(Data1*, Data1*)': test19.cpp:16:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test19.cpp:16:20: warning: Using field 'ptr3' without checking for null pointer test19.cpp: In function 'int func4(Data1*, Data1*)': test19.cpp:31:15: warning: Useless variable check 'ptr1'. It already was checked before else if (!ptr1 && ptr2) @@ -10,17 +11,22 @@ test19.cpp: In function 'int func6(Data1*, Data1*)': test19.cpp:52:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test19.cpp:52:20: warning: Using field 'ptr3' without checking for null pointer test19.cpp: In function 'int func7(Data1*, Data1*)': test19.cpp:66:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test19.cpp:66:20: warning: Using field 'ptr1' without checking for null pointer test19.cpp:67:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test19.cpp:67:20: warning: Using field 'ptr3' without checking for null pointer test19.cpp: In function 'int func8(Data1*, Data1*)': test19.cpp:81:20: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test19.cpp:81:20: warning: Using field 'ptr1' without checking for null pointer test19.cpp:82:20: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test19.cpp:82:20: warning: Using field 'ptr3' without checking for null pointer diff --git a/test/test20-03.txt b/test/test20-03.txt index 8bf8b9d..cb9b2bb 100644 --- a/test/test20-03.txt +++ b/test/test20-03.txt @@ -51,6 +51,7 @@ test20.c: In function 'func2': test20.c:16:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test20.c:16:15: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -405,6 +406,7 @@ test20.c: In function 'func6': test20.c:52:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test20.c:52:15: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -515,6 +517,7 @@ test20.c: In function 'func7': test20.c:66:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test20.c:66:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -534,6 +537,7 @@ modify_expr : ptr1, ptr2, ptr3, test20.c:67:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test20.c:67:15: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, @@ -648,6 +652,7 @@ test20.c: In function 'func8': test20.c:81:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test20.c:81:15: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -667,6 +672,7 @@ modify_expr : ptr1, ptr2, ptr3, test20.c:82:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test20.c:82:15: warning: Using field 'ptr3' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr3: ptr1, ptr2, ptr3, diff --git a/test/test20-04.txt b/test/test20-04.txt index 2082bba..461b79d 100644 --- a/test/test20-04.txt +++ b/test/test20-04.txt @@ -2,6 +2,7 @@ test20.c: In function 'func2': test20.c:16:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test20.c:16:15: warning: Using field 'ptr3' without checking for null pointer test20.c: In function 'func4': test20.c:31:14: warning: Useless variable check 'ptr1'. It already was checked before else if (!ptr1 && ptr2) @@ -10,17 +11,22 @@ test20.c: In function 'func6': test20.c:52:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 100; ^ +test20.c:52:15: warning: Using field 'ptr3' without checking for null pointer test20.c: In function 'func7': test20.c:66:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test20.c:66:15: warning: Using field 'ptr1' without checking for null pointer test20.c:67:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test20.c:67:15: warning: Using field 'ptr3' without checking for null pointer test20.c: In function 'func8': test20.c:81:15: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test20.c:81:15: warning: Using field 'ptr1' without checking for null pointer test20.c:82:15: warning: Using variable 'ptr3' without checking for null pointer ptr3->val = 200; ^ +test20.c:82:15: warning: Using field 'ptr3' without checking for null pointer diff --git a/test/test27-03.txt b/test/test27-03.txt index 3821618..25b545d 100644 --- a/test/test27-03.txt +++ b/test/test27-03.txt @@ -404,6 +404,7 @@ test27.cpp: In member function 'void Object1::func1(Data1*)': test27.cpp:55:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:55:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, this->tmp1, indirect_ref : ptr1, this->tmp1, parm_decl ptr1: ptr1, this->tmp1, @@ -455,6 +456,7 @@ modify_expr : ptr1, this->tmp1, test27.cpp:58:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:58:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, this->tmp1, indirect_ref : ptr1, this->tmp1, parm_decl ptr1: ptr1, this->tmp1, @@ -647,6 +649,7 @@ test27.cpp: In member function 'void Object1::func2(Data1*)': test27.cpp:74:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:74:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, this->tmp1, this->tmp2, indirect_ref : ptr1, this->tmp1, this->tmp2, parm_decl ptr1: ptr1, this->tmp1, this->tmp2, @@ -727,6 +730,7 @@ modify_expr : ptr1, this->tmp1, this->tmp2, test27.cpp:78:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 700; ^ +test27.cpp:78:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, this->tmp1, this->tmp2, indirect_ref : ptr1, this->tmp1, this->tmp2, parm_decl ptr1: ptr1, this->tmp1, this->tmp2, @@ -927,6 +931,7 @@ test27.cpp: In member function 'void Object1::func3(Data1*)': test27.cpp:108:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:108:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -1073,6 +1078,7 @@ modify_expr : ptr1, ptr2, test27.cpp:132:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:132:24: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, var_decl ptr2: ptr1, ptr2, @@ -1160,6 +1166,7 @@ modify_expr : ptr1, ptr2, test27.cpp:146:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:146:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -1292,6 +1299,7 @@ modify_expr : ptr1, ptr2, test27.cpp:170:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:170:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, indirect_ref : ptr1, ptr2, parm_decl ptr1: ptr1, ptr2, @@ -1449,6 +1457,7 @@ test27.cpp: In member function 'void Object1::func4(Data1*)': test27.cpp:192:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:192:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, @@ -1498,6 +1507,7 @@ modify_expr : ptr1, ptr2, this->tmp1, test27.cpp:197:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:197:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, this->tmp1, indirect_ref : ptr1, ptr2, this->tmp1, parm_decl ptr1: ptr1, ptr2, this->tmp1, @@ -1549,6 +1559,7 @@ modify_expr : ptr1, ptr2, this->tmp1, test27.cpp:200:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:200:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, this->tmp1, indirect_ref : ptr1, ptr2, this->tmp1, parm_decl ptr1: ptr1, ptr2, this->tmp1, @@ -1621,6 +1632,7 @@ test27.cpp: In member function 'void Object1::func5(Data1*, Data1*)': test27.cpp:207:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:207:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -1657,6 +1669,7 @@ modify_expr : ptr1, ptr2, ptr3, test27.cpp:209:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:209:24: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, var_decl ptr2: ptr1, ptr2, ptr3, @@ -1688,6 +1701,7 @@ modify_expr : ptr1, ptr2, ptr3, test27.cpp:212:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:212:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -1724,6 +1738,7 @@ modify_expr : ptr1, ptr2, ptr3, test27.cpp:215:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:215:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -1760,6 +1775,7 @@ modify_expr : ptr1, ptr2, ptr3, test27.cpp:217:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:217:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, indirect_ref : ptr1, ptr2, ptr3, parm_decl ptr1: ptr1, ptr2, ptr3, @@ -1796,6 +1812,7 @@ test27.cpp: In member function 'void Object1::func6(Data1*, Data1*)': test27.cpp:222:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:222:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr3, indirect_ref : ptr1, ptr3, parm_decl ptr1: ptr1, ptr3, @@ -1910,6 +1927,7 @@ modify_expr : ptr1, ptr3, test27.cpp:230:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:230:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr3, indirect_ref : ptr1, ptr3, parm_decl ptr1: ptr1, ptr3, @@ -1950,6 +1968,9 @@ cleanup_point_expr : ptr1, ptr3, expr_stmt : ptr3, convert_expr : ptr3, modify_expr : ptr3, +test27.cpp:232:24: warning: Using field 'ptr1' without checking for null pointer + ptr1->val = 500; + ^ component_ref : ptr3, indirect_ref : ptr3, parm_decl ptr1: ptr3, @@ -2003,6 +2024,7 @@ test27.cpp: In member function 'void Object1::func7(Data1*, Data1*)': test27.cpp:239:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:239:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, parm_decl ptr1: ptr1, ptr2, ptr3, this->tmp1, @@ -2039,6 +2061,7 @@ modify_expr : ptr1, ptr2, ptr3, this->tmp1, test27.cpp:241:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:241:24: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, var_decl ptr2: ptr1, ptr2, ptr3, this->tmp1, @@ -2070,6 +2093,7 @@ modify_expr : ptr1, ptr2, ptr3, this->tmp1, test27.cpp:244:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:244:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, parm_decl ptr1: ptr1, ptr2, ptr3, this->tmp1, @@ -2106,6 +2130,7 @@ modify_expr : ptr1, ptr2, ptr3, this->tmp1, test27.cpp:247:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:247:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, parm_decl ptr1: ptr1, ptr2, ptr3, this->tmp1, @@ -2149,6 +2174,7 @@ modify_expr : ptr1, ptr2, ptr3, this->tmp1, test27.cpp:249:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:249:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, parm_decl ptr1: ptr1, ptr2, ptr3, this->tmp1, @@ -2255,6 +2281,7 @@ test27.cpp: In member function 'void Object1::func8(Data1*, Data1*)': test27.cpp:259:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:259:24: warning: Using field 'ptr2' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, var_decl ptr2: ptr1, ptr2, ptr3, this->tmp1, @@ -2286,6 +2313,7 @@ modify_expr : ptr1, ptr2, ptr3, this->tmp1, test27.cpp:262:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:262:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, ptr2, ptr3, this->tmp1, indirect_ref : ptr1, ptr2, ptr3, this->tmp1, parm_decl ptr1: ptr1, ptr2, ptr3, this->tmp1, diff --git a/test/test27-04.txt b/test/test27-04.txt index 5c9433f..7d5ea0a 100644 --- a/test/test27-04.txt +++ b/test/test27-04.txt @@ -2,12 +2,14 @@ test27.cpp: In member function 'void Object1::func1(Data1*)': test27.cpp:55:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:55:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:56:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 400; ^ test27.cpp:58:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:58:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:59:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 600; ^ @@ -15,6 +17,7 @@ test27.cpp: In member function 'void Object1::func2(Data1*)': test27.cpp:74:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:74:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:75:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 500; ^ @@ -24,6 +27,7 @@ test27.cpp:76:28: warning: Using variable 'this->tmp2' without checking for null test27.cpp:78:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 700; ^ +test27.cpp:78:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:79:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 800; ^ @@ -34,28 +38,35 @@ test27.cpp: In member function 'void Object1::func3(Data1*)': test27.cpp:108:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:108:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:132:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:132:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:146:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:146:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:170:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:170:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func4(Data1*)': test27.cpp:192:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:192:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:197:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:197:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:198:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 400; ^ test27.cpp:200:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:200:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:201:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 600; ^ @@ -63,48 +74,65 @@ test27.cpp: In member function 'void Object1::func5(Data1*, Data1*)': test27.cpp:207:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:207:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:209:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:209:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:212:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:212:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:215:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:215:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:217:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:217:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func6(Data1*, Data1*)': test27.cpp:222:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:222:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:224:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 200; ^ test27.cpp:230:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:230:24: warning: Using field 'ptr1' without checking for null pointer +test27.cpp:232:24: warning: Using field 'ptr1' without checking for null pointer + ptr1->val = 500; + ^ test27.cpp: In member function 'void Object1::func7(Data1*, Data1*)': test27.cpp:239:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:239:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:241:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:241:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:244:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:244:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:247:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:247:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:249:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:249:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func8(Data1*, Data1*)': test27.cpp:259:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:259:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:262:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:262:28: warning: Using field 'ptr1' without checking for null pointer diff --git a/test/test27-05.txt b/test/test27-05.txt index 5c9433f..7d5ea0a 100644 --- a/test/test27-05.txt +++ b/test/test27-05.txt @@ -2,12 +2,14 @@ test27.cpp: In member function 'void Object1::func1(Data1*)': test27.cpp:55:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:55:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:56:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 400; ^ test27.cpp:58:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:58:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:59:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 600; ^ @@ -15,6 +17,7 @@ test27.cpp: In member function 'void Object1::func2(Data1*)': test27.cpp:74:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:74:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:75:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 500; ^ @@ -24,6 +27,7 @@ test27.cpp:76:28: warning: Using variable 'this->tmp2' without checking for null test27.cpp:78:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 700; ^ +test27.cpp:78:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:79:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 800; ^ @@ -34,28 +38,35 @@ test27.cpp: In member function 'void Object1::func3(Data1*)': test27.cpp:108:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:108:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:132:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:132:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:146:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:146:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:170:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:170:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func4(Data1*)': test27.cpp:192:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:192:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:197:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:197:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:198:28: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 400; ^ test27.cpp:200:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:200:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:201:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 600; ^ @@ -63,48 +74,65 @@ test27.cpp: In member function 'void Object1::func5(Data1*, Data1*)': test27.cpp:207:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:207:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:209:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:209:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:212:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:212:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:215:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:215:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:217:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:217:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func6(Data1*, Data1*)': test27.cpp:222:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:222:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:224:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 200; ^ test27.cpp:230:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:230:24: warning: Using field 'ptr1' without checking for null pointer +test27.cpp:232:24: warning: Using field 'ptr1' without checking for null pointer + ptr1->val = 500; + ^ test27.cpp: In member function 'void Object1::func7(Data1*, Data1*)': test27.cpp:239:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test27.cpp:239:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:241:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:241:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:244:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:244:28: warning: Using field 'ptr1' without checking for null pointer test27.cpp:247:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 400; ^ +test27.cpp:247:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp:249:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 500; ^ +test27.cpp:249:24: warning: Using field 'ptr1' without checking for null pointer test27.cpp: In member function 'void Object1::func8(Data1*, Data1*)': test27.cpp:259:24: warning: Using variable 'ptr2' without checking for null pointer ptr2->val = 200; ^ +test27.cpp:259:24: warning: Using field 'ptr2' without checking for null pointer test27.cpp:262:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 300; ^ +test27.cpp:262:28: warning: Using field 'ptr1' without checking for null pointer diff --git a/test/test33-03.txt b/test/test33-03.txt index ab46cfa..1ed9bb1 100644 --- a/test/test33-03.txt +++ b/test/test33-03.txt @@ -125,6 +125,7 @@ test33.cpp: In member function 'void Object1::func1(Data1*)': test33.cpp:46:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:46:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, @@ -239,6 +240,7 @@ test33.cpp: In member function 'void Object1::func2(Data1*)': test33.cpp:67:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:67:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, @@ -314,6 +316,7 @@ test33.cpp: In member function 'void Object1::func3(Data1*)': test33.cpp:82:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test33.cpp:82:28: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, diff --git a/test/test33-04.txt b/test/test33-04.txt index b0c7922..f5bb4e8 100644 --- a/test/test33-04.txt +++ b/test/test33-04.txt @@ -2,14 +2,17 @@ test33.cpp: In member function 'void Object1::func1(Data1*)': test33.cpp:46:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:46:24: warning: Using field 'ptr1' without checking for null pointer test33.cpp: In member function 'void Object1::func2(Data1*)': test33.cpp:67:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:67:24: warning: Using field 'ptr1' without checking for null pointer test33.cpp: In member function 'void Object1::func3(Data1*)': test33.cpp:82:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test33.cpp:82:28: warning: Using field 'ptr1' without checking for null pointer test33.cpp:91:9: warning: Useless variable check 'this->tmp2'. It already was checked before if (tmp2) ^ diff --git a/test/test33-05.txt b/test/test33-05.txt index b0c7922..f5bb4e8 100644 --- a/test/test33-05.txt +++ b/test/test33-05.txt @@ -2,14 +2,17 @@ test33.cpp: In member function 'void Object1::func1(Data1*)': test33.cpp:46:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:46:24: warning: Using field 'ptr1' without checking for null pointer test33.cpp: In member function 'void Object1::func2(Data1*)': test33.cpp:67:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test33.cpp:67:24: warning: Using field 'ptr1' without checking for null pointer test33.cpp: In member function 'void Object1::func3(Data1*)': test33.cpp:82:28: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test33.cpp:82:28: warning: Using field 'ptr1' without checking for null pointer test33.cpp:91:9: warning: Useless variable check 'this->tmp2'. It already was checked before if (tmp2) ^ diff --git a/test/test34-03.txt b/test/test34-03.txt index 4039099..0a53d2b 100644 --- a/test/test34-03.txt +++ b/test/test34-03.txt @@ -190,6 +190,7 @@ test34.cpp: In member function 'void Object1::func1(Data1*)': test34.cpp:60:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:60:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, @@ -349,6 +350,7 @@ test34.cpp: In member function 'void Object1::func2(Data1*)': test34.cpp:90:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:90:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, diff --git a/test/test34-04.txt b/test/test34-04.txt index 0031cb9..13d53a4 100644 --- a/test/test34-04.txt +++ b/test/test34-04.txt @@ -2,10 +2,12 @@ test34.cpp: In member function 'void Object1::func1(Data1*)': test34.cpp:60:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:60:24: warning: Using field 'ptr1' without checking for null pointer test34.cpp: In member function 'void Object1::func2(Data1*)': test34.cpp:90:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:90:24: warning: Using field 'ptr1' without checking for null pointer test34.cpp: In member function 'void Object1::func3(Data1*)': test34.cpp:102:23: warning: Using field 'ptr1' without checking for null pointer if (ptr1->val == 100) diff --git a/test/test34-05.txt b/test/test34-05.txt index 0031cb9..13d53a4 100644 --- a/test/test34-05.txt +++ b/test/test34-05.txt @@ -2,10 +2,12 @@ test34.cpp: In member function 'void Object1::func1(Data1*)': test34.cpp:60:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:60:24: warning: Using field 'ptr1' without checking for null pointer test34.cpp: In member function 'void Object1::func2(Data1*)': test34.cpp:90:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 200; ^ +test34.cpp:90:24: warning: Using field 'ptr1' without checking for null pointer test34.cpp: In member function 'void Object1::func3(Data1*)': test34.cpp:102:23: warning: Using field 'ptr1' without checking for null pointer if (ptr1->val == 100) diff --git a/test/test39-03.txt b/test/test39-03.txt index adc591b..8e8c196 100644 --- a/test/test39-03.txt +++ b/test/test39-03.txt @@ -372,6 +372,7 @@ test39.cpp: In member function 'void Object1::func1(Data1*) const': test39.cpp:63:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test39.cpp:63:24: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, @@ -439,6 +440,7 @@ modify_expr : ptr1, test39.cpp:73:22: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 0; ^ +test39.cpp:73:22: warning: Using field 'ptr1' without checking for null pointer component_ref : ptr1, indirect_ref : ptr1, parm_decl ptr1: ptr1, diff --git a/test/test39-04.txt b/test/test39-04.txt index c3fd401..791f49c 100644 --- a/test/test39-04.txt +++ b/test/test39-04.txt @@ -2,9 +2,11 @@ test39.cpp: In member function 'void Object1::func1(Data1*) const': test39.cpp:63:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test39.cpp:63:24: warning: Using field 'ptr1' without checking for null pointer test39.cpp:73:22: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 0; ^ +test39.cpp:73:22: warning: Using field 'ptr1' without checking for null pointer test39.cpp: In member function 'void Object1::func2(Data1*) const': test39.cpp:96:51: warning: Using parameter 'ptr1' without checking for null pointer ptr1->ptrval = reinterpret_cast(1); diff --git a/test/test39-05.txt b/test/test39-05.txt index 2ac8f8b..55efa8c 100644 --- a/test/test39-05.txt +++ b/test/test39-05.txt @@ -2,9 +2,11 @@ test39.cpp: In member function 'void Object1::func1(Data1*) const': test39.cpp:63:24: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 100; ^ +test39.cpp:63:24: warning: Using field 'ptr1' without checking for null pointer test39.cpp:73:22: warning: Using parameter 'ptr1' without checking for null pointer ptr1->val = 0; ^ +test39.cpp:73:22: warning: Using field 'ptr1' without checking for null pointer test39.cpp: In member function 'void Object1::func2(Data1*) const': test39.cpp:96:51: warning: Using parameter 'ptr1' without checking for null pointer ptr1->ptrval = reinterpret_cast(1); diff --git a/test/test42-01.txt b/test/test42-01.txt index 136927d..a0434ef 100644 --- a/test/test42-01.txt +++ b/test/test42-01.txt @@ -556,3 +556,69 @@ function_decl func2 test42.cpp 65:10 2147483647 integer_cst -2147483648 4 - min value integer_cst 2147483647 4 - max value integer_cst 100 2147483642 - operand +function_decl func3 test42.cpp 70:10 2147483647 +- isPublic: 1 + method_type 2147483646 - function type + void_type 2147483645 - method return type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + record_type 2147483645 - method base type + type_decl Object1 test42.cpp 44:7 2147483644 - type name + - isAutogenerated: 1 + tree_list 2147483645 - arg types + pointer_type 2147483644 - value + record_type 3 - nested type + type_decl Object1 test42.cpp 44:7 2 - type name + - isAutogenerated: 1 + tree_list 2147483644 - chain + pointer_type 2147483643 - value + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + tree_list 2147483643 - chain + void_type 2147483642 - value + type_decl void 0:0 2147483641 - type name + - isAutogenerated: 1 + result_decl test42.cpp 71:5 2147483646 - function result + - isAutogenerated: 1 + void_type 2147483645 - result type + type_decl void 0:0 2147483644 - type name + - isAutogenerated: 1 + parm_decl this test42.cpp 70:29 2147483646 - argument + - isAutogenerated: 1 + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Object1 test42.cpp 44:7 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + parm_decl ptr1 test42.cpp 70:23 2147483646 - argument + pointer_type 2147483645 - decl type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + integer_cst 64 2147483645 - parm size + cleanup_point_expr test42.cpp 72:25 2147483646 - code + expr_stmt test42.cpp 72:25 2147483645 - operand + convert_expr 2147483644 - expresssion + modify_expr 2147483643 - operand + component_ref test42.cpp 72:16 2147483642 - operand + indirect_ref 2147483641 - object + var_decl gptr1 test42.cpp 39:8 2147483640 - ref + - isUsed: 1 + integer_cst 64 2147483639 - decl size + pointer_type 2147483639 - var type + record_type 3 - nested type + type_decl Data1 test42.cpp 15:8 2 - type name + - isAutogenerated: 1 + field_decl val test42.cpp 17:9 2147483641 - field + - signed + integer_cst 32 2147483640 - decl size + integer_type 5 - field type + - precisionBits: 32 + - signed + type_decl int 0:0 4 - type name + - isAutogenerated: 1 + integer_cst 32 4 - type size + integer_cst -2147483648 4 - min value + integer_cst 2147483647 4 - max value + integer_cst 100 2147483642 - operand diff --git a/test/test42-02.txt b/test/test42-02.txt index b5db6a6..7e14625 100644 --- a/test/test42-02.txt +++ b/test/test42-02.txt @@ -6,3 +6,4 @@ getData1: getData2: func1: pointer_type ptr1, func2: pointer_type ptr1, +func3: pointer_type ptr1, diff --git a/test/test42-03.txt b/test/test42-03.txt index 3e5e48b..a5c6af3 100644 --- a/test/test42-03.txt +++ b/test/test42-03.txt @@ -195,3 +195,27 @@ integer_cst 32: ptr1, integer_cst -2147483648: ptr1, integer_cst 2147483647: ptr1, integer_cst 100: ptr1, +function_decl func3: +cleanup_point_expr : ptr1, +expr_stmt : ptr1, +convert_expr : ptr1, +modify_expr : ptr1, +test42.cpp: In member function 'void Object1::func3(Data1*) const': +test42.cpp:72:25: warning: Using field 'gptr1' without checking for null pointer + gptr1->val = 100; + ^ +component_ref : ptr1, +indirect_ref : ptr1, +var_decl gptr1: ptr1, +integer_cst 64: ptr1, +pointer_type : ptr1, +record_type : ptr1, +type_decl Data1: ptr1, +field_decl val: ptr1, +integer_cst 32: ptr1, +integer_type : ptr1, +type_decl int: ptr1, +integer_cst 32: ptr1, +integer_cst -2147483648: ptr1, +integer_cst 2147483647: ptr1, +integer_cst 100: ptr1, diff --git a/test/test42-04.txt b/test/test42-04.txt index 6cb26c8..f5e48b4 100644 --- a/test/test42-04.txt +++ b/test/test42-04.txt @@ -2,3 +2,7 @@ test42.cpp: In member function 'void Object1::func1(Data1*) const': test42.cpp:62:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 100; ^ +test42.cpp: In member function 'void Object1::func3(Data1*) const': +test42.cpp:72:25: warning: Using field 'gptr1' without checking for null pointer + gptr1->val = 100; + ^ diff --git a/test/test42-05.txt b/test/test42-05.txt index 6cb26c8..f5e48b4 100644 --- a/test/test42-05.txt +++ b/test/test42-05.txt @@ -2,3 +2,7 @@ test42.cpp: In member function 'void Object1::func1(Data1*) const': test42.cpp:62:24: warning: Using variable 'this->tmp1' without checking for null pointer tmp1->val = 100; ^ +test42.cpp: In member function 'void Object1::func3(Data1*) const': +test42.cpp:72:25: warning: Using field 'gptr1' without checking for null pointer + gptr1->val = 100; + ^ diff --git a/test/test42.cpp b/test/test42.cpp index f2ab4f7..1f5bfbe 100644 --- a/test/test42.cpp +++ b/test/test42.cpp @@ -67,12 +67,12 @@ class Object1 tmp3->val = 100; } -/* void func3(Data1 *ptr1) const { gptr1->val = 100; } +/* void func4(Data1 *ptr1) const { gptr2->val = 100; -- cgit v1.2.3-60-g2f50