Bug 137126

Summary: xclass-0.9.1-5: undefined C code
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Michal Marek <mmarek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2005-12-06 11:49:35 UTC
I just tried to compile package xclass-0.9.1-5 with a
prerelease of the GNU C compiler version 4.1. It said

OXHtmlIndex.cc:245: warning: operation on "i" may be undefined

The source code is

	while (i < 45 && isdigit(cp[i])) nbuf[i-1] = cp[i++];

I agree with the compiler - this code seems to be undefined.

Suggest new code  

	while (i < 45 && isdigit(cp[i])) 
	{
		nbuf[i-1] = cp[i];
		++i;
	}

BTW, the email address of the author is broken [ peraza@mitac11.uia.ac.be ]
Comment 1 Michal Marek 2005-12-06 15:41:14 UTC
Thanks, I've applied the patch for the SUSE package. Unfortunately, there are
bunch of 'may be used uninitialized warnings' too :-(