Bug 137753

Summary: thinkeramik-3.2.1-8: undefined C code
Product: [openSUSE] SUSE LINUX 10.0 Reporter: David Binderman <dcb314>
Component: TranslationsAssignee: E-mail List <kde-maintainers>
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-09 09:26:00 UTC
I just tried to compile package thinkeramik-3.2.1-8 with a
prerelease of the GNU C compiler version 4.1. It said

1.

./widget-engine/kstyle.cpp:1871: warning: operation on "data" may be undefined

The source code is

	*data++ = (unsigned char)((*data)*top_right_corner[i]);

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

Suggest new code  

	*data = (unsigned char)((*data)*top_right_corner[i]);
	++data;

or maybe

	*data++ = top_right_corner[i];

2.

./widget-engine/kstyle.cpp:1872: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1873: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1880: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1881: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1882: warning: operation on 'data' may be undefined

Duplicates.

3.

./widget-engine/kstyle.cpp:1884: warning: operation on 'c' may be undefined

The source code is

	c = ++c % 4;

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

Suggest new code  

	c = (c + 1) % 4;

4.

./widget-engine/kstyle.cpp:1889: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1890: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1891: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1916: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1917: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1918: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1925: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1926: warning: operation on 'data' may be undefined
./widget-engine/kstyle.cpp:1927: warning: operation on 'data' may be undefined

Duplicates.

BTW, I tried to email the author [ konro@lycos.jp ] but I got 
delivery failure.
Comment 1 Dirk Mueller 2006-01-27 14:34:00 UTC
fixed for 10.1