Compiler warnings: Unsigned char ....

Richard Sharpe (sharpe@ns.aus.com)
Thu, 30 Apr 1998 14:07:21 +0900

Message-Id: <3.0.5.32.19980430140721.008a8860@mail.adelaide.on.net>
Date:	Thu, 30 Apr 1998 14:07:21 +0900
To:	samba-technical@samba.anu.edu.au
From:	Richard Sharpe <sharpe@ns.aus.com>
Subject: Compiler warnings: Unsigned char ....

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@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 ...