(int) casting needed in libsmbclient.c on 3.0alpha23
MCCALL,DON (HP-USA,ex1)
don_mccall at hp.com
Fri Apr 4 20:49:40 GMT 2003
Hi folks,
Samba 3.0alpha23,
HP-UX 11.11
HP Ansi C compiler:
/opt/ansic/bin/cc:
LINT B.11.11.06 CXREF B.11.11.06
HP92453-01 B.11.11.06 HP C Compiler
$ Sep 8 2000 23:13:51 $
I had to make the following change to get libsmbclient.c to compile using
the HP Ansi C compiler:
# diff libsmbclient.c libsmbclient.original.c
2252c2252
< if ((int)(fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0)
{
---
> if ((fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0) {
2261c2261
< if ((int)(fid2 = c_print->open_print_job(c_print, printq)) < 0) {
---
> if ((fid2 = c_print->open_print_job(c_print, printq)) < 0) {
Otherwise I get the following errors:
cc: "libsmb/libsmbclient.c", line 2252: error 1649: Illegal integer-pointer
combination for <.
cc: "libsmb/libsmbclient.c", line 2252: error 1563: Expression in if must be
scalar.
cc: "libsmb/libsmbclient.c", line 2261: error 1649: Illegal integer-pointer
combination for <.
cc: "libsmb/libsmbclient.c", line 2261: error 1563: Expression in if must be
scalar.
Doesn't seem to be an issue with gcc.
I don't think explicitly casting this expression should break anything, and
it would fix it for us...
Thanks,
Don
More information about the samba-technical
mailing list