Bug 105843

Summary: nvi-m17n bad source code
Product: [Retired] Red Hat Linux Reporter: d.binderman
Component: nvi-m17nAssignee: Akira TAGOH <tagoh>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.79-20011024.15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-20 12:22:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description d.binderman 2003-09-28 11:23:29 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.10
from Redhat 9.0 with compiler flag -Wall.

The compiler said

../ex/ex_txt.c:420: warning: operation on `scno' may be undefined

The source code is

        scno -= --scno % sw;

Clearly wrong. Better

        --scno;
        scno -= scno % sw;

Even though it is important to worry about scno going negative, 
and then getting undefined answers.

Also, the compiler said

../vi/v_txt.c:2173: warning: operation on `target' may be undefined

and

../common/multi_iso2022.c:1141: warning: operation on `p' may be undefined

Looks like quite a bit of undefined code.


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


How reproducible:
Always

Steps to Reproduce:
1. compile with -Wall.
2.
3.
    

Additional info

Comment 1 Akira TAGOH 2003-10-20 12:22:25 UTC
fixed in 1.79-20011024.15.