Bug 137125

Summary: WindowMaker-applets-1.0-660: undefined C code
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: BasesystemAssignee: Vladimir Nadvornik <nadvornik>
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:47:32 UTC
I just tried to compile package WindowMaker-applets-1.0-660 with a
prerelease of the GNU C compiler version 4.1. It said

1.

wmcube.c:685: warning: operation on `i' may be undefined

The source code is

	zorder[i+1] = zorder[i--];

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

Suggest new code  

	zorder[i+1] = zorder[i];
	--i;

2.

wmcube.c:959: warning: operation on `i' may be undefined

The source code is

	fscanf(fp,"%d %d",&cline[i++],&cline[i++]);

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

Suggest new code  

	fscanf( fp, "%d %d", &cline[i], &cline[i + 1]);
	i += 2;

BTW, the email address of the author is broken
[ robkli-8@student.luth.se ]
Comment 1 Vladimir Nadvornik 2006-02-02 11:20:59 UTC
fixed for 10.1 beta4