Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 80823 - broken source code
Summary: broken source code
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rsync
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-31 18:11 UTC by d.binderman
Modified: 2014-08-31 23:24 UTC (History)
1 user (show)

Fixed In Version: 2.6.0-0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2004-01-06 15:29:46 UTC

Attachments (Terms of Use)

Description d.binderman 2002-12-31 18:11:08 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD  (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". 

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;
--- 197,203 ----
  			write_byte(f, n >> 8);
  			if (write_batch) { /* dw */
  			    write_batch_delta_file((char *)&n,sizeof(char));
! 			    temp_byte = (char) (n >> 8);

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

How reproducible:

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

Additional info:

Comment 1 Jay Fenlason 2004-01-06 15:29:46 UTC
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.