[SAMBA 4] [PATCH] Fix IBM checker warnings

Zachary Loafman zachary.loafman at isilon.com
Fri Feb 8 17:27:52 GMT 2008


> > uint32 foo;
> > foo = some integer result;
> > return foo;
>
> foo, however, is always a boolean type. It is fine for the IBM checker
> to warn when we're assigning a non-boolean value to a boolean type or
> returning a non-boolean value in a function that should return a
> boolean.

I've been staring too much at Samba3. You're right, of course, in
Samba4. In Samba3 it's still an integral type.

> This is not an issue in actual code, it's only an issue with the IBM
> checker.

I don't think C99 actually defines bitwise operations for Boolean types,
so I don't think this is a bug per se. Just like void * arithmetic may
be treated like char * arithmetic by several compilers. I would rather
my pedantic source code analyzer warn me of things that aren't actually
defined in the language.

Is this IBM checker BEAM perhaps? Most checkers, including BEAM, have
ways to set policies - it wouldn't be unreasonable to just squelch this
warning for Samba.

...Zach


More information about the samba-technical mailing list