Bug 80823 - broken source code
broken source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rsync (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-31 13:11 EST by d.binderman
Modified: 2014-08-31 19:24 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.6.0-0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-06 10:29:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-12-31 13:11:08 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I have just tried to compile package rsync-2.5.5-1 from Redhat 8.0

Here are some of the messages the compiler produces

cc: Info: token.c, line 200: In this statement, the right shift count "8" is greater than or equal to the size of the unpromoted operand "(char)n". 
(rightshiftovr)

Here is an untested patch to shut up the compiler.

./token.c.old ./token.c
*** ./token.c.old	Wed Dec 25 10:15:44 2002
--- ./token.c	Wed Dec 25 10:16:08 2002
***************
*** 197,203 ****
  			write_byte(f, n >> 8);
  			if (write_batch) { /* dw */
  			    write_batch_delta_file((char *)&n,sizeof(char));
! 			    temp_byte = (char) n >> 8;
  			    write_batch_delta_file(&temp_byte,sizeof(temp_byte));
  			}
  		}
--- 197,203 ----
  			write_byte(f, n >> 8);
  			if (write_batch) { /* dw */
  			    write_batch_delta_file((char *)&n,sizeof(char));
! 			    temp_byte = (char) (n >> 8);
  			    write_batch_delta_file(&temp_byte,sizeof(temp_byte));
  			}
  		}


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile with any C compiler that sanity checks shift counts, for example Compaq C.
2.
3.
    

Additional info:
Comment 1 Jay Fenlason 2004-01-06 10:29:46 EST
This fix was included in 2.6.0, which should be avaliable in RawHide 
now.  A further fix that corrects the code on big-endian machines has 
been committed to upstream CVS and should be included in 2.6.1. 

Note You need to log in before you can comment on or make changes to this bug.