[Webkit-unassigned] [Bug 75447] New: Ambiguous if-then-else in Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 2 14:21:22 PST 2012


           Summary: Ambiguous if-then-else in
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: isanbard at gmail.com

Clang discovered an ambiguous if-then-else in Source/WebKit/mac/Misc/WebNSPasteboardExtras.mm. Here's the code (around line 254):

    if (archive)
        if ([types containsObject:WebArchivePboardType])
            [self setData:[archive data] forType:WebArchivePboardType];
    else {
        // We should not have declared types that we aren't going to write (4031826).
        ASSERT(![types containsObject:NSRTFDPboardType]);
        ASSERT(![types containsObject:WebArchivePboardType]);

Clang suggests adding explicit braces. Indeed, the indenting suggests that the code should be different from what it is.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list