Bug 173970

Summary: enum constant CSSValueOblique in boolean context in CSSFontStyleValue.h
Product: WebKit Reporter: Sander Mathijs van Veen <sandervv+webkit>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, sandervv+webkit
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 169258    
Bug Blocks:    

Description Sander Mathijs van Veen 2017-06-29 08:58:34 PDT
I saw a compiler warning that looks like a typo and can cause a problem.

/home/smvv/work/jhbuild/checkout/webkitgtk-2.17.4/Source/WebCore/css/CSSFontStyleValue.h: In member function ‘bool WebCore::CSSFontStyleValue::isItalic() const’:
/home/smvv/work/jhbuild/checkout/webkitgtk-2.17.4/Source/WebCore/css/CSSFontStyleValue.h:53:49: warning: enum constant in boolean context [-Wint-in-bool-context]
             return valueID == CSSValueItalic || CSSValueOblique;
                                                 ^~~~~~~~~~~~~~~

A fix would be:

             return valueID == CSSValueItalic || valueID == CSSValueOblique;
Comment 1 Brent Fulgham 2022-07-15 11:07:10 PDT
It looks like Myles picked this fix up in Bug 174149.

*** This bug has been marked as a duplicate of bug 174149 ***