Bug 136822 - libwmf-0.2.8.2-95: undefined C code
Summary: libwmf-0.2.8.2-95: undefined C code
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: Vladimir Nadvornik
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-03 12:51 UTC by David Binderman
Modified: 2006-01-26 18:08 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-12-03 12:51:35 UTC
I just tried to compile package libwmf-0.2.8.2-95 with a prerelease of the
GNU C compiler version 4.1. It said

1.

gd_gd2.c:641: warning: operation on `chunkPos' may be undefined

The source code is

                          ch = chunkBuf[chunkPos++] << 24 +
                            chunkBuf[chunkPos++] << 16 +
                            chunkBuf[chunkPos++] << 8 +
                            chunkBuf[chunkPos++];

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

Suggest code rework. Maybe 

                          ch = chunkBuf[chunkPos] << 24 +
                            chunkBuf[chunkPos + 1] << 16 +
                            chunkBuf[chunkPos + 2] << 8 +
                            chunkBuf[chunkPos + 3];
                          chunkPos += 4;

might be ok.
Comment 1 David Binderman 2005-12-03 12:53:07 UTC
I forgot to mention that the email address of the author is broken
[ Caolan.McNamara@ul.ie ]
Comment 2 Vladimir Nadvornik 2006-01-26 18:08:48 UTC
fixed for 10.1 beta3, including email of the author.