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