Compiler warnings: Unsigned char ....
Jeremy Allison
jeremy at java.netapp.com
Thu Apr 30 05:44:08 GMT 1998
Richard Sharp wrote
>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:
Actually, no, I think it's caused by the signed/unsigned char
missmatch between the (char *)smb_passwd parameter and the
unsigned char that the smb_password_ok() function expects.
Please don't change BOOL as it's not the problem here.
The problem is I haven't found a gcc flag that will turn
on signed/unsigned warnings in parameter passing so more
picky compilers keep catching these things. The best thing
is to add a cast in the correct position to match the
expected parameter, it's not BOOL's fault honest :-).
Every so often Herb mails me a bunch of these warnings
and I fix them - I'll probably only fix them every time
I check in when Herb gets me the SGI O2 machine + compilers
he's hoping to get for me :-).
Cheers (posting this from home 'cos I'm a sad git with
no life :-).
Jeremy.
More information about the samba-technical
mailing list