Hi. Hope someone could shed some light on this.

I have this line in code:

Code:
(s&DisplayPixelFormat.dwBBitMask == DisplayPixelFormat.dwBBitMask)
Compiler complains that:

warning C4554: '&' : check operator precedence for possible error; use parentheses to clarify precedence
But Ive tried placing them at different places, the compiler doesnt then create warnings which is good BUT say I do it like so:

Code:
((s&DisplayPixelFormat.dwBBitMask) == DisplayPixelFormat.dwBBitMask)
The compiled program only displays it correctly when I dont use any parentheses. Any ideas why? Im trying to create a "warning free" program. It displays font bitmaps onscreen. Without added parantheses theyre spaced fine, with them, and some fonts get bunched up.

A snippet of whats before and after it:

Code:
for (y=y1; y<y1+HUD_FONT_HEIGHT; y++)
	{
unsigned short s = *(unsigned short *)(srcPtr + x*2 + y*ddsdimage.lPitch);
if (s&DisplayPixelFormat.dwBBitMask == DisplayPixelFormat.dwBBitMask) //C4554 Warning
	{
	blank=0;
	break;
	}
Driving me mad this warning so any help appreiciated.