Closed Bug 944259 Opened 8 years ago Closed 8 years ago

compiler warning in nsCSSRenderingBorders.cpp under OSX

Categories

(Core :: CSS Parsing and Computation, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 829993

People

(Reporter: jtd, Assigned: jaas)

Details

Attachments

(1 file)

In file included from /builds/mozcentral/obj-debug/layout/base/Unified_cpp_layout_base1.cpp:11:
Warning: -Wsometimes-uninitialized in /builds/mozcentral/layout/base/nsCSSRenderingBorders.cpp: variable 'borderRenderStyle' is used uninitialized whenever 'for' loop exits because its condition is false
/builds/mozcentral/layout/base/nsCSSRenderingBorders.cpp:739:21: warning: variable 'borderRenderStyle' is used uninitialized whenever 'for' loop exits because its condition is false [-Wsometimes-uninitialized]
  NS_FOR_CSS_SIDES (i) {
                    ^~
/builds/mozcentral/layout/base/../style/nsStyleConsts.h:22:76: note: expanded from macro 'NS_FOR_CSS_SIDES'
#define NS_FOR_CSS_SIDES(var_) for (mozilla::css::Side var_ = NS_SIDE_TOP; var_ <= NS_SIDE_LEFT; var_++)
                                                                           ^
/builds/mozcentral/layout/base/nsCSSRenderingBorders.cpp:748:7: note: uninitialized use occurs here
  if (borderRenderStyle == NS_STYLE_BORDER_STYLE_NONE ||
      ^~~~~~~~~~~~~~~~~
Dupe of bug 829993, where dbaron has r-ed an identical patch.  (I would prefer we did something to silence the warning, though, so please try to convince David!)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 829993
argh, checkin comment used this bug number.  please resolve bug 829993.  sorry for the bother.
You need to log in before you can comment on or make changes to this bug.