Bug 1668 - size_t != long long, compilation warnings
size_t != long long, compilation warnings
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.6
SGI IRIX
: P3 normal
: none
Assigned To: James Peach (outdated mail address)
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-26 05:47 UTC by Ralf Fassel
Modified: 2005-08-24 10:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Fassel 2004-08-26 05:47:27 UTC
IRIX 6.5.15, SGI cc MIPSpro Compilers: Version 7.30, samba 3.0.6

During compilation I get two warnings about pointer mismatches, which seem quite
important:

Compiling client/client.c
cc-1164 cc: WARNING File = client/client.c, Line = 699
  Argument of type "size_t *" is incompatible with parameter of type
          "unsigned long long *".

  			  &attr, &size, NULL, NULL, NULL)) {
  			         ^

cc-1164 cc: WARNING File = client/client.c, Line = 1075
  Argument of type "size_t *" is incompatible with parameter of type
          "unsigned long long *".

  			    !cli_getattrE(cli, fnum, NULL, &start, NULL, NULL, NULL)) {


config.h has
  			                                   ^
/* Whether the host supports long long's */
#define HAVE_LONGLONG 1

so the 
  #define SMB_BIG_UINT unsigned long long
in include/includes.h triggers.  But client/client.c uses a size_t pointer.

I haven't run the executable yet, but it looks like an assigment to a size_t
(4Bytes) via a long long * (long long = 8bytes) will corrupt the memory.

Best
R'
Comment 1 James Peach (outdated mail address) 2005-07-30 22:45:58 UTC
Reassign IRIX bugs to me.
Comment 2 James Peach (outdated mail address) 2005-08-06 23:04:05 UTC
Jerry fixed this in
        http://websvn.samba.org/cgi-bin/viewcvs.cgi?rev=5968&view=rev
Comment 3 Gerald (Jerry) Carter 2005-08-24 10:28:08 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.