compiler warning in libsmb/clireadwrite.c

Richard Sharpe rsharpe at richardsharpe.com
Wed Jan 29 07:28:02 GMT 2003


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) & 0xffffffff);

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



More information about the samba-technical mailing list