Bug 82190 - broken source code
Summary: broken source code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nvi-m17n
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-19 10:36 UTC by d.binderman
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-05-01 12:51:17 UTC
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-01-19 10:36:27 UTC
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 12:51:17 UTC
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.