<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 6:03 PM, Caolán McNamara <span dir="ltr"><<a href="mailto:caolanm@redhat.com" target="_blank">caolanm@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, 2013-02-05 at 14:26 -0800, julien2412 wrote:<br>
> Hello,<br>
><br>
> Cppcheck detected this:<br>
> sc/source/core/data/table5.cxx<br>
> 147 unreadVariable style Variable 'bSkipBreaks' is assigned a value that is<br>
> never used.<br>
<br>
</div>Hmm, I reckon kohei should have a look at that. bSkipBreaks doesn't go<br>
anywhere so its doing nothing. git blame shows d8c68b41b and references<br>
#i94698 and looking at the context of the original patch there it seems<br>
that back then there was only a single "bSkipBreaks" bool while now<br>
there are two, bSkipColBreaks and bSkipRowBreaks.<br>
<br>
Presumably somewhere along the go-ooo time<br>
sc-fit-to-width-height-skip-breaks.diff didn't apply after bSkipBreaks<br>
got split into bSkipColBreaks and bSkipRowBreaks and the fixup didn't<br>
take account of that.<br></blockquote><div><br>Yup, that's probably what happened. When you look closely at the two if statement blocks where the values of bSkipBreaks, bSkipColBreaks and bSkipRowBreaks are assigned, they are almost identical. The second one came from the patch I wrote back in the Go-OO times, and the first one was added by Niklas later. My patch was against the code before Niklas' change, and as a result of this mixup and merge hiccups bSkipBreaks got left out in limbo.<br>
<br>Given this, and the way the code looks today, we can safely remove bSkipBreaks and the whole if statement (the 2nd one) where bSkipBreaks is assigned a value.<br><br>Kohei<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
C.<br>
<br>
</font></span></blockquote></div><br>