Bug 211784

Summary: -Wattribute warning in BreakLines.cpp
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebCore Misc.Assignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, darin, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, mcatanzaro, pdr, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch for landing none

Michael Catanzaro
Reported 2020-05-12 09:37:43 PDT
Looks like another new GCC 10 warning: [625/1151] Building CXX object Source/...sources/UnifiedSource-043dd90b-1.cpp.o In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-043dd90b-1.cpp:4: /home/mcatanzaro/Projects/WebKit/Source/WebCore/rendering/BreakLines.cpp:53:78: warning: ‘visibility’ attribute ignored [-Wattributes] 53 | WEBCORE_EXPORT const unsigned char lineBreakTable[][lineBreakTableColumnCount] = { | ^ This variable does not seem to be used outside WebCore, so let's try removing it and see if EWS is happy.
Attachments
Patch (1.90 KB, patch)
2020-05-12 09:39 PDT, Michael Catanzaro
no flags
Patch for landing (1.85 KB, patch)
2020-05-12 14:42 PDT, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2020-05-12 09:39:29 PDT
Darin Adler
Comment 2 2020-05-12 10:55:07 PDT
Comment on attachment 399135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399135&action=review > Source/WebCore/ChangeLog:8 > + Don't export lineBreakTable. It's not used outside WebCore anyway. This comment is not accurate; it’s not what is done by this patch. Removing the WEBCORE_EXPORT from the definition does not change whether lineBreakTable is exported. That’s decided by the WEBCORE_EXPORT on the declaration in the header. I don’t know if lineBreakTable is used outside WebCore; to find out we’d have to check on the callers of all the WebCore inline functions that use lineBreakTable. If any of them are called outside WebCore, then it *is* used outside. If we wanted to not export it, then we’d have to remove the WEBCORE_EXPORT from the header. Removing this export from the .cpp file does seem like an acceptable way to fix the warning, so r=me on the code change, but please change this change log comment.
Michael Catanzaro
Comment 3 2020-05-12 14:03:08 PDT
You're right! Learning is good....
Michael Catanzaro
Comment 4 2020-05-12 14:42:00 PDT
Created attachment 399180 [details] Patch for landing
EWS
Comment 5 2020-05-12 15:07:30 PDT
Committed r261580: <https://trac.webkit.org/changeset/261580> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399180 [details].
Radar WebKit Bug Importer
Comment 6 2020-05-12 15:08:21 PDT
Note You need to log in before you can comment on or make changes to this bug.