summaryrefslogtreecommitdiff
path: root/test/test12-04.txt
blob: 6f02bd5db05283f42bc220aa105eb912df816930 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
test12.cpp: In member function 'void Object1::func1(Data1*, Data1*)':
test12.cpp:13:13: warning: Using variable 'ptr2' without checking for null pointer
         int val1 = ptr1 ? ptr1->val : ptr2->val;
             ^
test12.cpp:13:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:13:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:13:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:13:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:13:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp: In member function 'void Object1::func2(Data1*, Data1*)':
test12.cpp:18:13: warning: Using variable 'ptr1' without checking for null pointer
         int val1 = (!ptr1) ? ptr1->val : ptr2->val;
             ^
test12.cpp:18:13: warning: Using field 'ptr1' without checking for null pointer
test12.cpp:18:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:18:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:18:13: warning: Using variable 'ptr1' without checking for null pointer
test12.cpp:18:13: warning: Using field 'ptr1' without checking for null pointer
test12.cpp:18:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:18:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:18:13: warning: Using variable 'ptr1' without checking for null pointer
test12.cpp:18:13: warning: Using field 'ptr1' without checking for null pointer
test12.cpp:18:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:18:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp: In member function 'void Object1::func3(Data1*, Data1*)':
test12.cpp:23:13: warning: Using variable 'ptr2' without checking for null pointer
         int val1 = (ptr1 && !ptr2) ? ptr1->val : ptr2->val;
             ^
test12.cpp:23:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:23:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:23:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:23:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:23:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp: In member function 'void Object1::func4(Data1*, Data1*)':
test12.cpp:28:35: warning: Using parameter 'ptr2' without checking for null pointer
         if ((ptr1 ? ptr1 : ptr2)->val == 100)
                                   ^
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;
                                         ^
test12.cpp: In member function 'void Object1::func7(Data1*, Data1*)':
test12.cpp:50:13: warning: Using variable 'ptr2' without checking for null pointer
         int tmp = ptr1 ? ptr1->val : (!ptr2 ? ptr2->val : 0);
             ^
test12.cpp:50:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:50:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:50:13: warning: Using field 'ptr2' without checking for null pointer
test12.cpp:50:13: warning: Using variable 'ptr2' without checking for null pointer
test12.cpp:50:13: warning: Using field 'ptr2' without checking for null pointer