clang-cl warning: braced subobject initialization in ProxyAccessible.cpp

RESOLVED FIXED in Firefox 61

Status

()

Core
IPC
P3
normal
RESOLVED FIXED
a year ago
28 days ago

People

(Reporter: froydnj, Assigned: dmajor (away and/or busy))

Tracking

(Blocks: 1 bug)

unspecified
mozilla61
All
Windows
Points:
---

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
clang-cl complains thusly:

40:07.86 c:/m-c/accessible/ipc/win/ProxyAccessible.cpp(23,38):  warning: suggest braces around initialization of subobject [-Wmissing-braces]
40:07.86 static const VARIANT kChildIdSelf = {VT_I4};
40:07.86                                      ^~~~~
40:07.86                                      {    }
40:07.86 c:/m-c/accessible/ipc/win/ProxyAccessible.cpp(23,38):  warning: suggest braces around initialization of subobject [-Wmissing-braces]
40:07.86 static const VARIANT kChildIdSelf = {VT_I4};
40:07.86                                      ^~~~~
40:07.86                                      {    }
40:07.86 c:/m-c/accessible/ipc/win/ProxyAccessible.cpp(43,23):  warning: suggest braces around initialization of subobject [-Wmissing-braces]
40:07.86     VARIANT realId = {VT_I4};
40:07.86                       ^~~~~
40:07.86                       {    }
40:07.86 c:/m-c/accessible/ipc/win/ProxyAccessible.cpp(43,23):  warning: suggest braces around initialization of subobject [-Wmissing-braces]
40:07.86     VARIANT realId = {VT_I4};
40:07.86                       ^~~~~
40:07.86                       {    }

Updated

8 months ago
Priority: -- → P3
(Assignee)

Comment 1

28 days ago
Created attachment 8961468 [details] [diff] [review]
addbraces

This is super goofy but landing this seems like less friction than silencing the warning or triaging away the bug.
Assignee: nobody → dmajor
Attachment #8961468 - Flags: review?(eitan)

Comment 2

28 days ago
Comment on attachment 8961468 [details] [diff] [review]
addbraces

Stealing Eeejay's review with his permission, since I looked into this. :) This is indeed goofy, but it's fine. Note that there is another instance of this in HandlerProvider.cpp (around line 283) and I just added another instance in bug 1431256. These are inside functions, but I imagine they might trigger the same warning.
Attachment #8961468 - Flags: review?(eitan) → review+
(Assignee)

Comment 3

28 days ago
Thanks for the review! Yeah, I'm sure we have a bunch more of these, but if they don't have bugs filed then I don't particularly care at the moment. :-) For my immediate purposes I'm just trying to clean out bug 1443590's dependency tree so we can more easily see what work actually remains.

Comment 4

28 days ago
Pushed by dmajor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3f271715340
Add braces to initialization in ProxyAccessible.cpp to appease clang-cl. r=Jamie

Comment 5

28 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d3f271715340
Status: NEW → RESOLVED
Last Resolved: 28 days ago
status-firefox61: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.