Incorrect Slider assert


#1

I just ran the Visual Studio code analysis on JUCE, and it brought up a warning about this line in juce_Slider.cpp:jassert (style != TwoValueHorizontal || style != TwoValueVertical);
The warning says this evaluates to a non-zero value and it should use an && instead, which sounds right to me. There are two instances of this warning, at lines 403 and 414.


#2

Yes, that’s quite right. What tool is this? And why don’t I have it in my copy of Visual Studio!?


#3

Its a component of $$$$ Team System version(S)

targeted at enterprises. funny they don’t seem to use that crap internally?


#4

The Team Suite version of Visual Studio includes a pretty comprehensive code analyzer. It mostly focuses on unchecked system calls and the like, but it also notices other things. You basically just have to specify /analyze in the compiler options.

There were a few hundred other warnings, although most were in the vorbis library, not JUCE proper. The bulk of the Juce warnings came from an unchecked realloc in ArrayAllocationBase. I could get you the build log if you’d like to take a closer look.


#5

yeah, that’d be interesting to see, actually.


#6

I sent the build log a while ago; did you get it? Just checking it didn’t get stuck somewhere in the interweb tubes…


#7

no, there’s no sign of it…


#8

Spam filters may have got it. I sent it again with a different account (bimb0008@umn.edu), which should get through.


#9

ok, got it that time, thanks!


#10