Closed Bug 1216414 Opened 4 years ago Closed 4 years ago

Fix -Wimplicit-fallthrough and -Wshadow warnings in uriloader

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

Fix -Wshadow warnings:

uriloader/exthandler/nsExternalHelperAppService.cpp:2188:26 [-Wshadow] declaration of 'channel' shadows a previous local

uriloader/prefetch/nsOfflineCacheUpdate.cpp:748:22 [-Wshadow] declaration of 'rv' shadows a previous local

MOZ_FALLTHROUGH is an annotation to suppress clang's -Wimplicit-fallthrough warnings about switch cases that fall through without a break or return statement. MOZ_FALLTHROUGH is only needed on cases that have code:

switch (foo) {
  case 1: // These cases have no code. No fallthrough annotations are needed.
  case 2:
  case 3:
    foo = 4; // This case has code, so a fallthrough annotation is needed:
    MOZ_FALLTHROUGH;
  default:
    return foo;
}

uriloader/exthandler/nsExternalHelperAppService.cpp:1870:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
Attachment #8676022 - Flags: review?(honzab.moz)
Attachment #8676022 - Flags: review?(honzab.moz) → review+
https://hg.mozilla.org/mozilla-central/rev/336f9218fe67
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Blocks: 1253170
Blocks: 1272513
You need to log in before you can comment on or make changes to this bug.