[Webkit-unassigned] [Bug 275070] New: static_assert in wtf/DataLog.cpp causes warning on Linux

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 3 12:31:43 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275070

            Bug ID: 275070
           Summary: static_assert in wtf/DataLog.cpp causes warning on
                    Linux
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: InRadar
          Severity: Normal
          Priority: P4
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: marcus_plutowski at apple.com

rdar://129177831

gcc doesn’t like && on constant operands:

/var/home/phil/WebKit/Source/WTF/wtf/DataLog.cpp:48:19: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]                                                                            
   48 | static_assert(!(0 && 0), "Set at most one data-log file target");                                                                                                                                          
      |                   ^  ~                                                                                                                                                                                     
/var/home/phil/WebKit/Source/WTF/wtf/DataLog.cpp:48:19: note: use '&' for a bitwise operation                                                                                                                      
   48 | static_assert(!(0 && 0), "Set at most one data-log file target");                                                                                                                                          
      |                   ^~                                                                                                                                                                                       
      |                   &                                                                                                                                                                                        
/var/home/phil/WebKit/Source/WTF/wtf/DataLog.cpp:48:19: note: remove constant to silence this warning                                                                                                              
   48 | static_assert(!(0 && 0), "Set at most one data-log file target");                                                                                                                                          
      |                   ^~~~                                                                                                                                                                                     
1 warning generated. 

This causes some minor log spam and so should be fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240603/38e8008e/attachment-0001.htm>


More information about the webkit-unassigned mailing list