Bug 82190 - broken source code
broken source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nvi-m17n (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-19 05:36 EST by d.binderman
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-05-01 08:51:17 EDT
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 2003-01-19 05:36:27 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 just tried to compile package nvi-m17n-1.79-20011024.6 from Redhat 8.0

The compiler said

../ex/ex_txt.c:420: warning: operation on `scno' may be undefined
../vi/v_txt.c:2173: warning: operation on `target' may be undefined
../common/multi_iso2022.c:1141: warning: operation on `p' may be undefined

Here is an untested patch to shut up the compiler.

*** ./common/multi_iso2022.c.old	2003-01-17 17:38:46.000000000 +0000
--- ./common/multi_iso2022.c	2003-01-17 17:39:21.000000000 +0000
***************
*** 1138,1144 ****
  		if (dst) {
  			p = t;
  			while (*p)
! 				dst[p - t] = *p++;
  		}
  	}
  
--- 1138,1147 ----
  		if (dst) {
  			p = t;
  			while (*p)
! 			{
! 				dst[p - t] = *p;
! 				p++;
! 			}
  		}
  	}
  
*** ./ex/ex_txt.c.old	2003-01-17 17:36:44.000000000 +0000
--- ./ex/ex_txt.c	2003-01-17 17:37:32.000000000 +0000
***************
*** 417,423 ****
  
  	/* Get the previous shiftwidth column. */
  	cno = scno;
! 	scno -= --scno % sw;
  
  	/*
  	 * Since we don't know what comes before the character(s) being
--- 417,424 ----
  
  	/* Get the previous shiftwidth column. */
  	cno = scno;
! 	--scno;
! 	scno -= scno % sw;
  
  	/*
  	 * Since we don't know what comes before the character(s) being
*** ./vi/v_txt.c.old	2003-01-17 17:37:50.000000000 +0000
--- ./vi/v_txt.c	2003-01-17 17:38:25.000000000 +0000
***************
*** 2170,2176 ****
  	if (isindent)
  		target += COL_OFF(target, sw);
  	else
! 		target -= --target % sw;
  
  	/*
  	 * The AI characters will be turned into overwrite characters if the
--- 2170,2179 ----
  	if (isindent)
  		target += COL_OFF(target, sw);
  	else
! 	{
! 		--target;
! 		target -= target % sw;
! 	}
  
  	/*
  	 * The AI characters will be turned into overwrite characters if the

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


How reproducible:
Always

Steps to Reproduce:
1. compile the source code
2.
3.
    

Additional info
Comment 1 Akira TAGOH 2003-05-01 08:51:17 EDT
fixed in 1.79-20011024.13. such warnings are no longer appeared on 9, but
another warnings are shwon. so this fix is for anoher warnings, though.

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