Comment: | Fix shadowed variables and enable -Wshadow |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 0.90 |
Files: | files | file ages | folders |
SHA3-256: |
836314f39ad31a423f813392ad1c6054 |
User & Date: | js on 2017-10-11 20:59:32 |
Other Links: | branch diff | manifest | tags |
2017-10-14
| ||
18:53 | Fix more shadowed variables check-in: a54fb211ea user: js tags: 0.90 | |
2017-10-11
| ||
20:59 | Fix shadowed variables and enable -Wshadow check-in: 836314f39a user: js tags: 0.90 | |
2017-10-07
| ||
15:14 | OFThread: Fix setting the name on the wrong thread check-in: 1a502ac38c user: js tags: 0.90 | |
Modified ObjFW.xcodeproj/project.pbxproj from [b65ec16d37] to [fbe50e44c7].
︙ | |||
3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 | 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 | + | ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 2; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-fexceptions", |
︙ | |||
3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 | 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 | + | ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = c11; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 2; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_PEDANTIC = YES; GCC_WARN_SHADOW = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; OTHER_CFLAGS = ( "-fexceptions", "-fconstant-string-class=OFConstantString", |
︙ |
Modified configure.ac from [2563c79b96] to [e88e11e798].
︙ | |||
172 173 174 175 176 177 178 179 180 181 182 183 184 185 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | + + | AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings" AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings") ]) AX_CHECK_COMPILER_FLAGS(-Wsign-compare -Werror, [OBJCFLAGS="$OBJCFLAGS -Wsign-compare"]) AX_CHECK_COMPILER_FLAGS(-Wshadow -Werror, [OBJCFLAGS="$OBJCFLAGS -Wshadow"]) AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32 -Werror, [OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"]) AX_CHECK_COMPILER_FLAGS(-Wsemicolon-before-method-body -Werror, [OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"]) AX_CHECK_COMPILER_FLAGS(-Wobjc-missing-property-synthesis -Werror, [OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"]) AX_CHECK_COMPILER_FLAGS(-Watomic-properties -Werror, [ |
︙ |
Modified src/OFArray.m from [ad4973a648] to [ffbda05782].
︙ | |||
271 272 273 274 275 276 277 | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | - + - | - (id)objectAtIndexedSubscript: (size_t)index { return [self objectAtIndex: index]; } - (id)valueForKey: (OFString *)key { |
︙ | |||
728 729 730 731 732 733 734 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - - - + + + | for (id object in self) [object performSelector: selector]; } - (void)makeObjectsPerformSelector: (SEL)selector withObject: (id)object { |
︙ |
Modified src/OFINICategory.m from [e8548169a5] to [95cd2a6086].
︙ | |||
506 507 508 509 510 511 512 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | - + - + | if ([line isKindOfClass: [OFINICategory_Comment class]]) { OFINICategory_Comment *comment = line; [stream writeFormat: @"%@\r\n", comment->_comment]; } else if ([line isKindOfClass: [OFINICategory_Pair class]]) { OFINICategory_Pair *pair = line; OFString *key = escapeString(pair->_key); OFString *value = escapeString(pair->_value); |
Modified src/OFMapTable.m from [9a08c57256] to [1517e60617].
︙ | |||
205 206 207 208 209 210 211 | 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + - + | if (mapTable->_count != _count || mapTable->_keyFunctions.equal != _keyFunctions.equal || mapTable->_objectFunctions.equal != _objectFunctions.equal) return false; for (uint32_t i = 0; i < _capacity; i++) { if (_buckets[i] != NULL && _buckets[i] != &deleted) { |
︙ |
Modified src/OFSet.m from [876ac85821] to [9a3d14535d].
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + - | - (size_t)count { OF_UNRECOGNIZED_SELECTOR } - (id)valueForKey: (OFString *)key { |
︙ |
Modified src/OFString+XMLUnescaping.m from [d6e6b667b8] to [9667538219].
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + - + + - + - + - + + - + | length: 1]; else if (entityLength == 3 && memcmp(entity, "amp", 3) == 0) [ret appendCString: "&" encoding: OF_STRING_ENCODING_ASCII length: 1]; else if (entity[0] == '#') { |
︙ |
Modified src/OFURL.m from [114ec293ed] to [2082375f0b].
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + - + - + | _user = [[OFString alloc] initWithUTF8String: UTF8String]; UTF8String = tmp2; } if ((tmp2 = strchr(UTF8String, ':')) != NULL) { |
︙ |
Modified tests/OFArrayTests.m from [b0ab3f0686] to [bbcc951492].
︙ | |||
349 350 351 352 353 354 355 | 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | - + - + - - + + - + - + - + - + - + - + - + - + - - + + | TEST(@"Detection of mutation during Fast Enumeration", ok) [m[0] removeLastObject]; #ifdef OF_HAVE_BLOCKS { |
︙ |
Modified tests/OFDictionaryTests.m from [76bc88ef2a] to [f2dd61fdb9].
︙ | |||
264 265 266 267 268 269 270 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | - - + + - - - + + + - + - + - + - + - + - + - + - + - + + | TEST(@"-[stringByURLEncoding]", [[[OFDictionary dictionaryWithKeysAndObjects: @"foo", @"bar", @"q&x", @"q=x", nil] stringByURLEncoding] isEqual: @"q%26x=q%3Dx&foo=bar"]) #ifdef OF_HAVE_BLOCKS { |
︙ |
Modified tests/OFListTests.m from [3c7e2e133b] to [9cc03e5fa4].
︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - - + + - - + + | [list prependObject: strings[0]]; loe = [list firstListObject]; i = 0; ok = true; |
Modified utils/ofhttp/OFHTTP.m from [492c8ebbc8] to [92c2a328ea].
︙ | |||
830 831 832 833 834 835 836 | 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 | - - + + + - + | } else lengthString = OF_LOCALIZED(@"size_unknown", @"unknown"); if (_verbose) { void *pool = objc_autoreleasePoolPush(); OFDictionary OF_GENERIC(OFString *, OFString *) |
︙ |