I read your post over five times but unfortunately I didn't understand what your problem is. You want to compare what with what?
And what the desired result would be?
From syntax point of view:
If you write if (a), this is equivalent with if (a != 0).
If you write if (!a), this is equivalent with if (a == 0).
So in our case let us replace 'a' variable with WarningCode&0x0019:
If you write if (WarningCode & 0x0019), this is equivalent with if ( (WarningCode & 0x0019) != 0 ).
If you write if ( !(WarningCode & 0x0019) ), this is equivalent with if ( (WarningCode & 0x0019) == 0 ).
From algebra point of view:
0x19 = 11001b. Let's see this through an example. We will AND 0x19 with 0x09. The result would be 0x09 (1001b).
So if you use the condition of the original post, then you have a false condition, because the result will not be 1, but 9.
If you use the condition mentioned in post #2, then you have a true condition because 9 is not 0.