Closed Bug 1387158 Opened 2 years ago Closed 2 years ago

Lots of -Wcomma warnings coming from NS_FOR_CSS_FULL_CORNERS

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: ehsan, Assigned: ehsan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I get many -Wcomma warnings like the below with clang 4.0:

 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:186:133: warning: possible misuse of comma operator here [-Wcomma]
 4:12.38     int32_t i186 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i186 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i186), true); ++i186) {
 4:12.38                                                                                                                                     ^
 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:186:108: note: cast expression to void to silence warning
 4:12.38     int32_t i186 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i186 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i186), true); ++i186) {
 4:12.38                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
 4:12.38                                                                                                            static_cast<void>(       )
 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:192:133: warning: possible misuse of comma operator here [-Wcomma]
 4:12.38     int32_t i192 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i192 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i192), true); ++i192) {
 4:12.38                                                                                                                                     ^
 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:192:108: note: cast expression to void to silence warning
 4:12.38     int32_t i192 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i192 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i192), true); ++i192) {
 4:12.38                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
 4:12.38                                                                                                            static_cast<void>(       )
 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:234:133: warning: possible misuse of comma operator here [-Wcomma]
 4:12.38     int32_t i234 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i234 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i234), true); ++i234) {
 4:12.38                                                                                                                                     ^
 4:12.38 /home/ehsan/moz/src.1347035/obj-ff-opt/dist/include/mozilla/gfx/PathHelpers.h:234:108: note: cast expression to void to silence warning
 4:12.38     int32_t i234 = mozilla::eCornerTopLeft; for (mozilla::Corner i; i234 <= mozilla::eCornerBottomLeft && (i = mozilla::Corner(i234), true); ++i234) {
 4:12.38                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~
 4:12.38                                                                                                            static_cast<void>(       )
Comment on attachment 8893503 [details] [diff] [review]
Silence the -Wcomma compiler warnings in Types.h macros iterating over Corners and Sides

Review of attachment 8893503 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8893503 - Flags: review?(dholbert) → review+
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c6f4a1a5d65a
Silence the -Wcomma compiler warnings in Types.h macros iterating over Corners and Sides; r=dholbert
https://hg.mozilla.org/mozilla-central/rev/c6f4a1a5d65a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.