1<--- FIXED ---> 2-------------------------------------------------------------------------------------------- 3[31m[1m./src/sys/tests/linter/testDuplicates.c:10:3: error:[0m Incorrect use of PetscValidIntPointer(), use PetscValidScalarPointer() instead [-fincompatible-function]: 4 8 : PetscValidIntPointer(a, 1); 5 9 : /* no remove */ 6> 10: [33m[1mPetscValidIntPointer(b, 5)[0m; 7 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 8 11: /* ~should~ be removed but won't be */ 9 12: PetscValidScalarPointer(b, 7); 10 11./src/sys/tests/linter/testDuplicates.c:10:24 Note: Due to 'b' of type 'PetscScalar *' (a.k.a. 'double *') 12 8 : PetscValidIntPointer(a, 1); 13 9 : /* no remove */ 14> 10: PetscValidIntPointer([33m[1mb[0m, 5); 15 [33m[1m^[0m 16 11: /* ~should~ be removed but won't be */ 17 12: PetscValidScalarPointer(b, 7); 18[31m[1m./src/sys/tests/linter/testDuplicates.c:10:27: error:[0m Argument number doesn't match for 'b'. Expected '2', found '5' [-fmatching-arg-num]: 19 8 : PetscValidIntPointer(a, 1); 20 9 : /* no remove */ 21> 10: PetscValidIntPointer(b, [33m[1m5[0m); 22 [33m[1m^[0m 23 11: /* ~should~ be removed but won't be */ 24 12: PetscValidScalarPointer(b, 7); 25 26./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here: 27 1: #include <petsc/private/petscimpl.h> 28 2: 29> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, [33m[1mPetscScalar *b[0m) 30 [33m[1m^^^^^^^^^^^^^^[0m 31 4: { 32 5: /* no remove */ 33[31m[1m./src/sys/tests/linter/testDuplicates.c:12:30: error:[0m Argument number doesn't match for 'b'. Expected '2', found '7' [-fmatching-arg-num]: 34 10: PetscValidIntPointer(b, 5); 35 11: /* ~should~ be removed but won't be */ 36> 12: PetscValidScalarPointer(b, [33m[1m7[0m); 37 [33m[1m^[0m 38 13: PetscValidScalarPointer(b, 3); 39 14: return 0; 40 41./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here: 42 1: #include <petsc/private/petscimpl.h> 43 2: 44> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, [33m[1mPetscScalar *b[0m) 45 [33m[1m^^^^^^^^^^^^^^[0m 46 4: { 47 5: /* no remove */ 48[31m[1m./src/sys/tests/linter/testDuplicates.c:13:30: error:[0m Argument number doesn't match for 'b'. Expected '2', found '3' [-fmatching-arg-num]: 49 11: /* ~should~ be removed but won't be */ 50 12: PetscValidScalarPointer(b, 7); 51> 13: PetscValidScalarPointer(b, [33m[1m3[0m); 52 [33m[1m^[0m 53 14: return 0; 54 15: } 55 56./src/sys/tests/linter/testDuplicates.c:3:55 Note: 'b' is traceable to argument #2 'b' in enclosing function here: 57 1: #include <petsc/private/petscimpl.h> 58 2: 59> 3: PetscErrorCode testDuplicatesWithChanges(PetscInt *a, [33m[1mPetscScalar *b[0m) 60 [33m[1m^^^^^^^^^^^^^^[0m 61 4: { 62 5: /* no remove */ 63[31m[1m./src/sys/tests/linter/testDuplicates.c:8:3: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 64 4: { 65 5: /* no remove */ 66> 6: [33m[1mPetscValidIntPointer(a, 1)[0m; 67 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 68 7: /* remove */ 69 8: PetscValidIntPointer(a, 1); 70[31m[1m./src/sys/tests/linter/testDuplicates.c:23:3: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 71 18: { 72 19: /* no remove */ 73> 20: [33m[1mPetscValidIntPointer(a, 1)[0m; 74 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 75 21: PetscValidScalarPointer(b, 2); 76 22: /* remove */ 77 23: PetscValidIntPointer(a, 1); 78[31m[1m./src/sys/tests/linter/testDuplicates.c:24:3: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 79 19: /* no remove */ 80 20: PetscValidIntPointer(a, 1); 81> 21: [33m[1mPetscValidScalarPointer(b, 2)[0m; 82 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 83 22: /* remove */ 84 23: PetscValidIntPointer(a, 1); 85 24: PetscValidScalarPointer(b, 2); 86[31m[1m./src/sys/tests/linter/testDuplicates.c:27:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 87 18: { 88 19: /* no remove */ 89> 20: [33m[1mPetscValidIntPointer(a, 1)[0m; 90 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 91 21: PetscValidScalarPointer(b, 2); 92 22: /* remove */ 93 23: PetscValidIntPointer(a, 1); 94 24: PetscValidScalarPointer(b, 2); 95 25: { 96 26: /* remove */ 97 27: PetscValidIntPointer(a, 1); 98[31m[1m./src/sys/tests/linter/testDuplicates.c:28:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 99 19: /* no remove */ 100 20: PetscValidIntPointer(a, 1); 101> 21: [33m[1mPetscValidScalarPointer(b, 2)[0m; 102 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 103 22: /* remove */ 104 23: PetscValidIntPointer(a, 1); 105 24: PetscValidScalarPointer(b, 2); 106 25: { 107 26: /* remove */ 108 27: PetscValidIntPointer(a, 1); 109 28: PetscValidScalarPointer(b, 2); 110[31m[1m./src/sys/tests/linter/testDuplicates.c:39:3: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 111 34: { 112 35: /* no remove */ 113> 36: [33m[1mPetscValidIntPointer(a, 1)[0m; 114 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 115 37: PetscValidScalarPointer(b, 2); 116 38: /* remove */ 117 39: PetscValidIntPointer(a, 1); 118[31m[1m./src/sys/tests/linter/testDuplicates.c:40:3: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 119 35: /* no remove */ 120 36: PetscValidIntPointer(a, 1); 121> 37: [33m[1mPetscValidScalarPointer(b, 2)[0m; 122 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 123 38: /* remove */ 124 39: PetscValidIntPointer(a, 1); 125 40: PetscValidScalarPointer(b, 2); 126[31m[1m./src/sys/tests/linter/testDuplicates.c:43:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 127 34: { 128 35: /* no remove */ 129> 36: [33m[1mPetscValidIntPointer(a, 1)[0m; 130 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 131 37: PetscValidScalarPointer(b, 2); 132 38: /* remove */ 133 39: PetscValidIntPointer(a, 1); 134 40: PetscValidScalarPointer(b, 2); 135 41: { 136 42: /* remove */ 137 43: PetscValidIntPointer(a, 1); 138[31m[1m./src/sys/tests/linter/testDuplicates.c:44:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 139 35: /* no remove */ 140 36: PetscValidIntPointer(a, 1); 141> 37: [33m[1mPetscValidScalarPointer(b, 2)[0m; 142 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 143 38: /* remove */ 144 39: PetscValidIntPointer(a, 1); 145 40: PetscValidScalarPointer(b, 2); 146 41: { 147 42: /* remove */ 148 43: PetscValidIntPointer(a, 1); 149 44: PetscValidScalarPointer(b, 2); 150[31m[1m./src/sys/tests/linter/testDuplicates.c:48:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 151 34: { 152 35: /* no remove */ 153> 36: [33m[1mPetscValidIntPointer(a, 1)[0m; 154 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 155 37: PetscValidScalarPointer(b, 2); 156 38: /* remove */ 157 39: PetscValidIntPointer(a, 1); 158 40: PetscValidScalarPointer(b, 2); 159 41: { 160 42: /* remove */ 161 43: PetscValidIntPointer(a, 1); 162 44: PetscValidScalarPointer(b, 2); 163 45: } 164 46: { 165 47: /* remove */ 166 48: PetscValidIntPointer(a, 1); 167[31m[1m./src/sys/tests/linter/testDuplicates.c:49:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 168 35: /* no remove */ 169 36: PetscValidIntPointer(a, 1); 170> 37: [33m[1mPetscValidScalarPointer(b, 2)[0m; 171 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 172 38: /* remove */ 173 39: PetscValidIntPointer(a, 1); 174 40: PetscValidScalarPointer(b, 2); 175 41: { 176 42: /* remove */ 177 43: PetscValidIntPointer(a, 1); 178 44: PetscValidScalarPointer(b, 2); 179 45: } 180 46: { 181 47: /* remove */ 182 48: PetscValidIntPointer(a, 1); 183 49: PetscValidScalarPointer(b, 2); 184[31m[1m./src/sys/tests/linter/testDuplicates.c:79:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 185 72: { 186 73: /* no remove */ 187> 74: [33m[1mPetscValidIntPointer(a, 1)[0m; 188 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 189 75: PetscValidScalarPointer(b, 2); 190 76: switch (cond) { 191 77: case PETSC_TRUE: 192 78: /* remove */ 193 79: PetscValidIntPointer(a, 1); 194[31m[1m./src/sys/tests/linter/testDuplicates.c:80:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 195 73: /* no remove */ 196 74: PetscValidIntPointer(a, 1); 197> 75: [33m[1mPetscValidScalarPointer(b, 2)[0m; 198 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 199 76: switch (cond) { 200 77: case PETSC_TRUE: 201 78: /* remove */ 202 79: PetscValidIntPointer(a, 1); 203 80: PetscValidScalarPointer(b, 2); 204[31m[1m./src/sys/tests/linter/testDuplicates.c:84:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 205 72: { 206 73: /* no remove */ 207> 74: [33m[1mPetscValidIntPointer(a, 1)[0m; 208 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 209 75: PetscValidScalarPointer(b, 2); 210 76: switch (cond) { 211 77: case PETSC_TRUE: 212 78: /* remove */ 213 79: PetscValidIntPointer(a, 1); 214 80: PetscValidScalarPointer(b, 2); 215 81: break; 216 82: case PETSC_FALSE: 217 83: /* remove */ 218 84: PetscValidIntPointer(a, 1); 219[31m[1m./src/sys/tests/linter/testDuplicates.c:85:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 220 73: /* no remove */ 221 74: PetscValidIntPointer(a, 1); 222> 75: [33m[1mPetscValidScalarPointer(b, 2)[0m; 223 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 224 76: switch (cond) { 225 77: case PETSC_TRUE: 226 78: /* remove */ 227 79: PetscValidIntPointer(a, 1); 228 80: PetscValidScalarPointer(b, 2); 229 81: break; 230 82: case PETSC_FALSE: 231 83: /* remove */ 232 84: PetscValidIntPointer(a, 1); 233 85: PetscValidScalarPointer(b, 2); 234[31m[1m./src/sys/tests/linter/testDuplicates.c:112:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 235 106: { 236 107: /* no remove */ 237> 108: [33m[1mPetscValidIntPointer(a, 1)[0m; 238 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 239 109: PetscValidScalarPointer(b, 2); 240 110: if (cond) { 241 111: /* remove */ 242 112: PetscValidIntPointer(a, 1); 243[31m[1m./src/sys/tests/linter/testDuplicates.c:113:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 244 107: /* no remove */ 245 108: PetscValidIntPointer(a, 1); 246> 109: [33m[1mPetscValidScalarPointer(b, 2)[0m; 247 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 248 110: if (cond) { 249 111: /* remove */ 250 112: PetscValidIntPointer(a, 1); 251 113: PetscValidScalarPointer(b, 2); 252[31m[1m./src/sys/tests/linter/testDuplicates.c:116:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 253 106: { 254 107: /* no remove */ 255> 108: [33m[1mPetscValidIntPointer(a, 1)[0m; 256 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 257 109: PetscValidScalarPointer(b, 2); 258 110: if (cond) { 259 111: /* remove */ 260 112: PetscValidIntPointer(a, 1); 261 113: PetscValidScalarPointer(b, 2); 262 114: } else { 263 115: /* remove */ 264 116: PetscValidIntPointer(a, 1); 265[31m[1m./src/sys/tests/linter/testDuplicates.c:117:5: error:[0m Duplicate function found previous identical usage [-fduplicate-function]: 266 107: /* no remove */ 267 108: PetscValidIntPointer(a, 1); 268> 109: [33m[1mPetscValidScalarPointer(b, 2)[0m; 269 [33m[1m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m 270 110: if (cond) { 271 111: /* remove */ 272 112: PetscValidIntPointer(a, 1); 273 113: PetscValidScalarPointer(b, 2); 274 114: } else { 275 115: /* remove */ 276 116: PetscValidIntPointer(a, 1); 277 117: PetscValidScalarPointer(b, 2); 278-------------------------------------------------------------------------------------------- 279<--- LEFT ---> 280