Compiler warnings: Unsigned char ....

Richard Sharpe sharpe at ns.aus.com
Thu Apr 30 05:07:21 GMT 1998


Hi,

I was briefly looking at the compiler warnings I am seeing on Digital UNIX
with Samba.

Here is an example of the warnings again when compiling with the native
Digital UNIX compiler:

>Compiling reply.c
>cc: Warning: reply.c, line 408: In this statement, the referenced type of
the 
>pointer value "smb_passwd" is "signed char", which is not compatible with 
>"unsigned char".
>                if (!smb_password_ok(smb_trust_acct, smb_passwd, 
>mb_nt_passwd))
>---------------------^

This is caused by he define in smb.h of BOOL:

>typedef int BOOL;

The native compiler obviously thinks that a boolean should be an unsigned
int, not a signed int.

I could fix the problem by changing that definition in smb.h, but the use
of BOOL pervades Samba, and I an fearful of breaking things.

Could anyone suggest what the problems might be if I change the definition
of BOOL to unsigned char?



Regards
-------
Richard Sharpe, sharpe at ns.aus.com, NIC-Handle:RJS96
NS Computer Software and Services P/L, 
Ph: +61-8-8281-0063, FAX: +61-8-8250-2080, 
Linux, AIX, Digital UNIX, ULTRIX, SunOS, Samba, Apache, NetScape,
StrongHold, Perl, C, PPP ...


More information about the samba-technical mailing list