[Webkit-unassigned] [Bug 193806] [PlayStation] Upstream playstation's remote inspector server
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 4 15:31:40 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=193806
--- Comment #41 from Christopher Reid <chris.reid at sony.com> ---
Comment on attachment 362940
--> https://bugs.webkit.org/attachment.cgi?id=362940
Inspector Server
View in context: https://bugs.webkit.org/attachment.cgi?id=362940&action=review
>>> Source/JavaScriptCore/inspector/remote/playstation/RemoteInspectorSocketClientPlayStation.cpp:48
>>> + saServer.sin_family = AF_INET;
>>
>> The names in here that are abbreviations are unusual for WebKit style (`saServer`, `ret`).
>>
>> Normally I see initialization with memset:
>>
>> memset(&saServer, 0, sizeof(struct sockaddr_in));
>>
>> I'm not sure if the { 0 } alone would be enough.
>
> I am almost sure that { 0 } style will work, and it is pretty common in Windows code, but not a common idiom outside Windows as far as I know. I believe that in Modern C++ it can just be { }.
The { 0 } style was raising -Wmissing-field-initializers in GCC and clang with -Wall and -Wextra but that warning does seem harmless in this case.
The { } style seems to work fine without having the warning, it looks like clang even compiles out `struct sockaddr_in address = { }` to the equivalent memset call. I can change it to { } in a followup patch.
--
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/20190304/7f0cf7a4/attachment.html>
More information about the webkit-unassigned
mailing list