WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
195652
[Win] Fix a slew of simple clang-cl warnings.
https://bugs.webkit.org/show_bug.cgi?id=195652
Summary
[Win] Fix a slew of simple clang-cl warnings.
Ross Kirsling
Reported
2019-03-12 17:12:20 PDT
[Win] Fix a slew of simple clang-cl warnings.
Attachments
Patch
(31.14 KB, patch)
2019-03-12 17:38 PDT
,
Ross Kirsling
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews105 for mac-highsierra-wk2
(2.59 MB, application/zip)
2019-03-12 18:52 PDT
,
EWS Watchlist
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ross Kirsling
Comment 1
2019-03-12 17:38:45 PDT
Created
attachment 364483
[details]
Patch
Don Olmstead
Comment 2
2019-03-12 17:42:29 PDT
Comment on
attachment 364483
[details]
Patch r=me assuming we're green.
EWS Watchlist
Comment 3
2019-03-12 18:52:26 PDT
Comment hidden (obsolete)
Comment on
attachment 364483
[details]
Patch
Attachment 364483
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
https://webkit-queues.webkit.org/results/11483638
New failing tests: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
EWS Watchlist
Comment 4
2019-03-12 18:52:27 PDT
Comment hidden (obsolete)
Created
attachment 364493
[details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
WebKit Commit Bot
Comment 5
2019-03-12 21:24:54 PDT
Comment on
attachment 364483
[details]
Patch Clearing flags on attachment: 364483 Committed
r242842
: <
https://trac.webkit.org/changeset/242842
>
WebKit Commit Bot
Comment 6
2019-03-12 21:24:55 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2019-03-12 21:25:17 PDT
<
rdar://problem/48836268
>
Darin Adler
Comment 8
2019-03-18 13:35:51 PDT
Comment on
attachment 364483
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=364483&action=review
> Source/WebCore/PAL/pal/win/LoggingWin.cpp:40 > + static const char* loggingEnvironmentVariable = "WebCoreLogging";
Should have been "const char* const"
> Source/WebCore/platform/win/LoggingWin.cpp:40 > + static const char* loggingEnvironmentVariable = "WebCoreLogging";
Ditto.
> Source/WebKit/Platform/win/LoggingWin.cpp:41 > + static const char* loggingEnvironmentVariable = "WebKitLogging";
Ditto.
Ross Kirsling
Comment 9
2019-03-19 04:00:05 PDT
(In reply to Darin Adler from
comment #8
)
> > Source/WebCore/PAL/pal/win/LoggingWin.cpp:40 > > + static const char* loggingEnvironmentVariable = "WebCoreLogging"; > > Should have been "const char* const"
It seemed to be a really strange typo(?) so I made it match what `auto` would give, but certainly that wouldn't stop one from overwriting the string. At that rate surely `constexpr auto` (or explicitly `constexpr const char*`) would be better though, no?
Darin Adler
Comment 10
2019-03-19 09:15:33 PDT
"static const char*" is a global variable that can be overwritten with a new value. The characters can’t be overwritten, but the pointer can be. "static const char* const" is a global constant that can’t be overwritten. I don’t think the patch should have removed const, that was my point. The patch changed from a constant pointer to non-constant characters (warning was about the non-constant characters pointing to read-only characters that are not safe to modify) to a *non-constant* pointer to constant characters. I don’t think making the pointer non-const was an improvement. And yes, other ways to write it. The constexpr version sounds fine.
Ross Kirsling
Comment 11
2019-03-19 19:02:35 PDT
Committed
r243186
: <
https://trac.webkit.org/changeset/243186
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug