xref: /petsc/src/sys/tests/linter/output/testDuplicates.out (revision df4cd43f92eaa320656440c40edb1046daee8f75)
1<--- FIXED --->
2--------------------------------------------------------------------------------------------
3ERROR 0: ./src/sys/tests/linter/testDuplicates.c:10:24
4'b' of type 'PetscScalar *' (a.k.a. 'double *')
5  8 : PetscValidIntPointer(a, 1);
6  9 : /* no remove */
7> 10: PetscValidIntPointer(b, 5);
8                           ^
9  11: /* ~should~ be removed but won't be */
10  12: PetscValidScalarPointer(b, 7);
11
12Incorrect use of PetscValidIntPointer(), use PetscValidScalarPointer() instead [-fincompatible-function]
13
14ERROR 1: ./src/sys/tests/linter/testDuplicates.c:10:27
15'5' of type 'int'
16  8 : PetscValidIntPointer(a, 1);
17  9 : /* no remove */
18> 10: PetscValidIntPointer(b, 5);
19                              ^
20  11: /* ~should~ be removed but won't be */
21  12: PetscValidScalarPointer(b, 7);
22
23Argument number doesn't match for 'b'. Expected '2', found '5' [-fmatching-arg-num]
24
25./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here:
26  1: #include <petsc/private/petscimpl.h>
27  2:
28> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, PetscScalar *b)
29                                                           ^^^^^^^^^^^^^^
30  4: {
31  5:   /* no remove */
32
33ERROR 2: ./src/sys/tests/linter/testDuplicates.c:12:30
34'7' of type 'int'
35  10: PetscValidIntPointer(b, 5);
36  11: /* ~should~ be removed but won't be */
37> 12: PetscValidScalarPointer(b, 7);
38                                 ^
39  13: PetscValidScalarPointer(b, 3);
40  14: return 0;
41
42Argument number doesn't match for 'b'. Expected '2', found '7' [-fmatching-arg-num]
43
44./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here:
45  1: #include <petsc/private/petscimpl.h>
46  2:
47> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, PetscScalar *b)
48                                                           ^^^^^^^^^^^^^^
49  4: {
50  5:   /* no remove */
51
52ERROR 3: ./src/sys/tests/linter/testDuplicates.c:13:30
53'3' of type 'int'
54  11:   /* ~should~ be removed but won't be */
55  12:   PetscValidScalarPointer(b, 7);
56> 13:   PetscValidScalarPointer(b, 3);
57                                   ^
58  14:   return 0;
59  15: }
60
61Argument number doesn't match for 'b'. Expected '2', found '3' [-fmatching-arg-num]
62
63./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here:
64  1: #include <petsc/private/petscimpl.h>
65  2:
66> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, PetscScalar *b)
67                                                           ^^^^^^^^^^^^^^
68  4: {
69  5:   /* no remove */
70
71ERROR 4: ./src/sys/tests/linter/testDuplicates.c:8:3
72'PetscValidIntPointer' of type 'void'
73  6 : PetscValidIntPointer(a, 1);
74  7 : /* remove */
75> 8 : PetscValidIntPointer(a, 1);
76      ^^^^^^^^^^^^^^^^^^^^^^^^^^
77  9 : /* no remove */
78  10: PetscValidIntPointer(b, 5);
79
80Duplicate function found previous identical usage [-fduplicate-function]:
81  4: {
82  5:   /* no remove */
83> 6:   PetscValidIntPointer(a, 1);
84       ^^^^^^^^^^^^^^^^^^^^^^^^^^
85  7:   /* remove */
86  8:   PetscValidIntPointer(a, 1);
87
88ERROR 5: ./src/sys/tests/linter/testDuplicates.c:23:3
89'PetscValidIntPointer' of type 'void'
90  21: PetscValidScalarPointer(b, 2);
91  22: /* remove */
92> 23: PetscValidIntPointer(a, 1);
93      ^^^^^^^^^^^^^^^^^^^^^^^^^^
94  24: PetscValidScalarPointer(b, 2);
95  25: {
96
97Duplicate function found previous identical usage [-fduplicate-function]:
98  18: {
99  19:   /* no remove */
100> 20:   PetscValidIntPointer(a, 1);
101        ^^^^^^^^^^^^^^^^^^^^^^^^^^
102  21:   PetscValidScalarPointer(b, 2);
103  22:   /* remove */
104  23:   PetscValidIntPointer(a, 1);
105
106ERROR 6: ./src/sys/tests/linter/testDuplicates.c:24:3
107'PetscValidScalarPointer' of type 'void'
108  22: /* remove */
109  23: PetscValidIntPointer(a, 1);
110> 24: PetscValidScalarPointer(b, 2);
111      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112  25: {
113  26:   /* remove */
114
115Duplicate function found previous identical usage [-fduplicate-function]:
116  19: /* no remove */
117  20: PetscValidIntPointer(a, 1);
118> 21: PetscValidScalarPointer(b, 2);
119      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120  22: /* remove */
121  23: PetscValidIntPointer(a, 1);
122  24: PetscValidScalarPointer(b, 2);
123
124ERROR 7: ./src/sys/tests/linter/testDuplicates.c:27:5
125'PetscValidIntPointer' of type 'void'
126  25: {
127  26:   /* remove */
128> 27:   PetscValidIntPointer(a, 1);
129        ^^^^^^^^^^^^^^^^^^^^^^^^^^
130  28:   PetscValidScalarPointer(b, 2);
131  29: }
132
133Duplicate function found previous identical usage [-fduplicate-function]:
134  18: {
135  19:   /* no remove */
136> 20:   PetscValidIntPointer(a, 1);
137        ^^^^^^^^^^^^^^^^^^^^^^^^^^
138  21:   PetscValidScalarPointer(b, 2);
139  22:   /* remove */
140  23:   PetscValidIntPointer(a, 1);
141  24:   PetscValidScalarPointer(b, 2);
142  25:   {
143  26:     /* remove */
144  27:     PetscValidIntPointer(a, 1);
145
146ERROR 8: ./src/sys/tests/linter/testDuplicates.c:28:5
147'PetscValidScalarPointer' of type 'void'
148  26:   /* remove */
149  27:   PetscValidIntPointer(a, 1);
150> 28:   PetscValidScalarPointer(b, 2);
151        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152  29: }
153  30: return 0;
154
155Duplicate function found previous identical usage [-fduplicate-function]:
156  19: /* no remove */
157  20: PetscValidIntPointer(a, 1);
158> 21: PetscValidScalarPointer(b, 2);
159      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160  22: /* remove */
161  23: PetscValidIntPointer(a, 1);
162  24: PetscValidScalarPointer(b, 2);
163  25: {
164  26:   /* remove */
165  27:   PetscValidIntPointer(a, 1);
166  28:   PetscValidScalarPointer(b, 2);
167
168ERROR 9: ./src/sys/tests/linter/testDuplicates.c:39:3
169'PetscValidIntPointer' of type 'void'
170  37: PetscValidScalarPointer(b, 2);
171  38: /* remove */
172> 39: PetscValidIntPointer(a, 1);
173      ^^^^^^^^^^^^^^^^^^^^^^^^^^
174  40: PetscValidScalarPointer(b, 2);
175  41: {
176
177Duplicate function found previous identical usage [-fduplicate-function]:
178  34: {
179  35:   /* no remove */
180> 36:   PetscValidIntPointer(a, 1);
181        ^^^^^^^^^^^^^^^^^^^^^^^^^^
182  37:   PetscValidScalarPointer(b, 2);
183  38:   /* remove */
184  39:   PetscValidIntPointer(a, 1);
185
186ERROR 10: ./src/sys/tests/linter/testDuplicates.c:40:3
187'PetscValidScalarPointer' of type 'void'
188  38: /* remove */
189  39: PetscValidIntPointer(a, 1);
190> 40: PetscValidScalarPointer(b, 2);
191      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192  41: {
193  42:   /* remove */
194
195Duplicate function found previous identical usage [-fduplicate-function]:
196  35: /* no remove */
197  36: PetscValidIntPointer(a, 1);
198> 37: PetscValidScalarPointer(b, 2);
199      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200  38: /* remove */
201  39: PetscValidIntPointer(a, 1);
202  40: PetscValidScalarPointer(b, 2);
203
204ERROR 11: ./src/sys/tests/linter/testDuplicates.c:43:5
205'PetscValidIntPointer' of type 'void'
206  41: {
207  42:   /* remove */
208> 43:   PetscValidIntPointer(a, 1);
209        ^^^^^^^^^^^^^^^^^^^^^^^^^^
210  44:   PetscValidScalarPointer(b, 2);
211  45: }
212
213Duplicate function found previous identical usage [-fduplicate-function]:
214  34: {
215  35:   /* no remove */
216> 36:   PetscValidIntPointer(a, 1);
217        ^^^^^^^^^^^^^^^^^^^^^^^^^^
218  37:   PetscValidScalarPointer(b, 2);
219  38:   /* remove */
220  39:   PetscValidIntPointer(a, 1);
221  40:   PetscValidScalarPointer(b, 2);
222  41:   {
223  42:     /* remove */
224  43:     PetscValidIntPointer(a, 1);
225
226ERROR 12: ./src/sys/tests/linter/testDuplicates.c:44:5
227'PetscValidScalarPointer' of type 'void'
228  42:   /* remove */
229  43:   PetscValidIntPointer(a, 1);
230> 44:   PetscValidScalarPointer(b, 2);
231        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
232  45: }
233  46: {
234
235Duplicate function found previous identical usage [-fduplicate-function]:
236  35: /* no remove */
237  36: PetscValidIntPointer(a, 1);
238> 37: PetscValidScalarPointer(b, 2);
239      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240  38: /* remove */
241  39: PetscValidIntPointer(a, 1);
242  40: PetscValidScalarPointer(b, 2);
243  41: {
244  42:   /* remove */
245  43:   PetscValidIntPointer(a, 1);
246  44:   PetscValidScalarPointer(b, 2);
247
248ERROR 13: ./src/sys/tests/linter/testDuplicates.c:48:5
249'PetscValidIntPointer' of type 'void'
250  46: {
251  47:   /* remove */
252> 48:   PetscValidIntPointer(a, 1);
253        ^^^^^^^^^^^^^^^^^^^^^^^^^^
254  49:   PetscValidScalarPointer(b, 2);
255  50: }
256
257Duplicate function found previous identical usage [-fduplicate-function]:
258  34: {
259  35:   /* no remove */
260> 36:   PetscValidIntPointer(a, 1);
261        ^^^^^^^^^^^^^^^^^^^^^^^^^^
262  37:   PetscValidScalarPointer(b, 2);
263  38:   /* remove */
264  39:   PetscValidIntPointer(a, 1);
265  40:   PetscValidScalarPointer(b, 2);
266  41:   {
267  42:     /* remove */
268  43:     PetscValidIntPointer(a, 1);
269  44:     PetscValidScalarPointer(b, 2);
270  45:   }
271  46:   {
272  47:     /* remove */
273  48:     PetscValidIntPointer(a, 1);
274
275ERROR 14: ./src/sys/tests/linter/testDuplicates.c:49:5
276'PetscValidScalarPointer' of type 'void'
277  47:   /* remove */
278  48:   PetscValidIntPointer(a, 1);
279> 49:   PetscValidScalarPointer(b, 2);
280        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281  50: }
282  51: return 0;
283
284Duplicate function found previous identical usage [-fduplicate-function]:
285  35: /* no remove */
286  36: PetscValidIntPointer(a, 1);
287> 37: PetscValidScalarPointer(b, 2);
288      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
289  38: /* remove */
290  39: PetscValidIntPointer(a, 1);
291  40: PetscValidScalarPointer(b, 2);
292  41: {
293  42:   /* remove */
294  43:   PetscValidIntPointer(a, 1);
295  44:   PetscValidScalarPointer(b, 2);
296  45: }
297  46: {
298  47:   /* remove */
299  48:   PetscValidIntPointer(a, 1);
300  49:   PetscValidScalarPointer(b, 2);
301
302ERROR 15: ./src/sys/tests/linter/testDuplicates.c:79:5
303'PetscValidIntPointer' of type 'void'
304  77: case PETSC_TRUE:
305  78:   /* remove */
306> 79:   PetscValidIntPointer(a, 1);
307        ^^^^^^^^^^^^^^^^^^^^^^^^^^
308  80:   PetscValidScalarPointer(b, 2);
309  81:   break;
310
311Duplicate function found previous identical usage [-fduplicate-function]:
312  72: {
313  73:   /* no remove */
314> 74:   PetscValidIntPointer(a, 1);
315        ^^^^^^^^^^^^^^^^^^^^^^^^^^
316  75:   PetscValidScalarPointer(b, 2);
317  76:   switch (cond) {
318  77:   case PETSC_TRUE:
319  78:     /* remove */
320  79:     PetscValidIntPointer(a, 1);
321
322ERROR 16: ./src/sys/tests/linter/testDuplicates.c:80:5
323'PetscValidScalarPointer' of type 'void'
324  78:   /* remove */
325  79:   PetscValidIntPointer(a, 1);
326> 80:   PetscValidScalarPointer(b, 2);
327        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
328  81:   break;
329  82: case PETSC_FALSE:
330
331Duplicate function found previous identical usage [-fduplicate-function]:
332  73: /* no remove */
333  74: PetscValidIntPointer(a, 1);
334> 75: PetscValidScalarPointer(b, 2);
335      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
336  76: switch (cond) {
337  77: case PETSC_TRUE:
338  78:   /* remove */
339  79:   PetscValidIntPointer(a, 1);
340  80:   PetscValidScalarPointer(b, 2);
341
342ERROR 17: ./src/sys/tests/linter/testDuplicates.c:84:5
343'PetscValidIntPointer' of type 'void'
344  82: case PETSC_FALSE:
345  83:   /* remove */
346> 84:   PetscValidIntPointer(a, 1);
347        ^^^^^^^^^^^^^^^^^^^^^^^^^^
348  85:   PetscValidScalarPointer(b, 2);
349  86:   break;
350
351Duplicate function found previous identical usage [-fduplicate-function]:
352  72: {
353  73:   /* no remove */
354> 74:   PetscValidIntPointer(a, 1);
355        ^^^^^^^^^^^^^^^^^^^^^^^^^^
356  75:   PetscValidScalarPointer(b, 2);
357  76:   switch (cond) {
358  77:   case PETSC_TRUE:
359  78:     /* remove */
360  79:     PetscValidIntPointer(a, 1);
361  80:     PetscValidScalarPointer(b, 2);
362  81:     break;
363  82:   case PETSC_FALSE:
364  83:     /* remove */
365  84:     PetscValidIntPointer(a, 1);
366
367ERROR 18: ./src/sys/tests/linter/testDuplicates.c:85:5
368'PetscValidScalarPointer' of type 'void'
369  83:   /* remove */
370  84:   PetscValidIntPointer(a, 1);
371> 85:   PetscValidScalarPointer(b, 2);
372        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
373  86:   break;
374  87: }
375
376Duplicate function found previous identical usage [-fduplicate-function]:
377  73: /* no remove */
378  74: PetscValidIntPointer(a, 1);
379> 75: PetscValidScalarPointer(b, 2);
380      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
381  76: switch (cond) {
382  77: case PETSC_TRUE:
383  78:   /* remove */
384  79:   PetscValidIntPointer(a, 1);
385  80:   PetscValidScalarPointer(b, 2);
386  81:   break;
387  82: case PETSC_FALSE:
388  83:   /* remove */
389  84:   PetscValidIntPointer(a, 1);
390  85:   PetscValidScalarPointer(b, 2);
391
392ERROR 19: ./src/sys/tests/linter/testDuplicates.c:112:5
393'PetscValidIntPointer' of type 'void'
394  110: if (cond) {
395  111:   /* remove */
396> 112:   PetscValidIntPointer(a, 1);
397         ^^^^^^^^^^^^^^^^^^^^^^^^^^
398  113:   PetscValidScalarPointer(b, 2);
399  114: } else {
400
401Duplicate function found previous identical usage [-fduplicate-function]:
402  106: {
403  107:   /* no remove */
404> 108:   PetscValidIntPointer(a, 1);
405         ^^^^^^^^^^^^^^^^^^^^^^^^^^
406  109:   PetscValidScalarPointer(b, 2);
407  110:   if (cond) {
408  111:     /* remove */
409  112:     PetscValidIntPointer(a, 1);
410
411ERROR 20: ./src/sys/tests/linter/testDuplicates.c:113:5
412'PetscValidScalarPointer' of type 'void'
413  111:   /* remove */
414  112:   PetscValidIntPointer(a, 1);
415> 113:   PetscValidScalarPointer(b, 2);
416         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
417  114: } else {
418  115:   /* remove */
419
420Duplicate function found previous identical usage [-fduplicate-function]:
421  107: /* no remove */
422  108: PetscValidIntPointer(a, 1);
423> 109: PetscValidScalarPointer(b, 2);
424       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
425  110: if (cond) {
426  111:   /* remove */
427  112:   PetscValidIntPointer(a, 1);
428  113:   PetscValidScalarPointer(b, 2);
429
430ERROR 21: ./src/sys/tests/linter/testDuplicates.c:116:5
431'PetscValidIntPointer' of type 'void'
432  114: } else {
433  115:   /* remove */
434> 116:   PetscValidIntPointer(a, 1);
435         ^^^^^^^^^^^^^^^^^^^^^^^^^^
436  117:   PetscValidScalarPointer(b, 2);
437  118: }
438
439Duplicate function found previous identical usage [-fduplicate-function]:
440  106: {
441  107:   /* no remove */
442> 108:   PetscValidIntPointer(a, 1);
443         ^^^^^^^^^^^^^^^^^^^^^^^^^^
444  109:   PetscValidScalarPointer(b, 2);
445  110:   if (cond) {
446  111:     /* remove */
447  112:     PetscValidIntPointer(a, 1);
448  113:     PetscValidScalarPointer(b, 2);
449  114:   } else {
450  115:     /* remove */
451  116:     PetscValidIntPointer(a, 1);
452
453ERROR 22: ./src/sys/tests/linter/testDuplicates.c:117:5
454'PetscValidScalarPointer' of type 'void'
455  115:   /* remove */
456  116:   PetscValidIntPointer(a, 1);
457> 117:   PetscValidScalarPointer(b, 2);
458         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
459  118: }
460  119: return 0;
461
462Duplicate function found previous identical usage [-fduplicate-function]:
463  107: /* no remove */
464  108: PetscValidIntPointer(a, 1);
465> 109: PetscValidScalarPointer(b, 2);
466       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
467  110: if (cond) {
468  111:   /* remove */
469  112:   PetscValidIntPointer(a, 1);
470  113:   PetscValidScalarPointer(b, 2);
471  114: } else {
472  115:   /* remove */
473  116:   PetscValidIntPointer(a, 1);
474  117:   PetscValidScalarPointer(b, 2);
475--------------------------------------------------------------------------------------------
476<--- LEFT --->
477