Re: compiler warning in libsmb/clireadwrite.c
On Wed, 29 Jan 2003 [EMAIL PROTECTED] wrote: > On Tue, Jan 28, 2003 at 11:28:02PM -0800, Richard Sharpe wrote: > > > > Is there a portable way to isolate the upper 32 bits? > > Check out the #ifdef code in smbd/reply.c OK, I think we need to surround the two areas in the client lib with: #ifdef LARGE_SMB_OFF_T /* current code ... */ #endif /* LARGE_SMB_OFF_T */ Regards - Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com
Re: compiler warning in libsmb/clireadwrite.c
On Tue, Jan 28, 2003 at 11:28:02PM -0800, Richard Sharpe wrote: > > Is there a portable way to isolate the upper 32 bits? Check out the #ifdef code in smbd/reply.c Jeremy.
Re: compiler warning in libsmb/clireadwrite.c
On Wed, 29 Jan 2003, Tim Potter wrote: > Er, should I be worried about this warning? > > libsmb/clireadwrite.c: In function `cli_issue_read': > libsmb/clireadwrite.c:54: warning: right shift count >= width of type > libsmb/clireadwrite.c: In function `cli_issue_write': > libsmb/clireadwrite.c:301: warning: right shift count >= width of type > > It's presumably complaining about the size of offset being 32 bits. > > static BOOL cli_issue_read(struct cli_state *cli, int fnum, > off_t offset, size_t size, int i) > { > [...] > > if (bigoffset) > SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0x); Is there a portable way to isolate the upper 32 bits? Regards - Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com
Re: compiler warning in libsmb/clireadwrite.c
On Wed, Jan 29, 2003 at 04:44:06PM +1100, Tim Potter wrote: > Er, should I be worried about this warning? > > libsmb/clireadwrite.c: In function `cli_issue_read': > libsmb/clireadwrite.c:54: warning: right shift count >= width of type > libsmb/clireadwrite.c: In function `cli_issue_write': > libsmb/clireadwrite.c:301: warning: right shift count >= width of type > > It's presumably complaining about the size of offset being 32 bits. > > static BOOL cli_issue_read(struct cli_state *cli, int fnum, > off_t offset, size_t size, int i) > { > [...] > > if (bigoffset) > SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0x); Hmmm. It should really be using an SMB_OFF_T which will be 64-bits on a 64-bit machine. Jeremy.
compiler warning in libsmb/clireadwrite.c
Er, should I be worried about this warning? libsmb/clireadwrite.c: In function `cli_issue_read': libsmb/clireadwrite.c:54: warning: right shift count >= width of type libsmb/clireadwrite.c: In function `cli_issue_write': libsmb/clireadwrite.c:301: warning: right shift count >= width of type It's presumably complaining about the size of offset being 32 bits. static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset, size_t size, int i) { [...] if (bigoffset) SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0x); Tim.