Bug 136687 - abiword-2.2.9-3: undefined code
Summary: abiword-2.2.9-3: undefined code
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P5 - None : Minor
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-02 15:04 UTC by David Binderman
Modified: 2008-08-14 20:50 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-02 15:04:01 UTC
I just tried to compile package abiword-2.2.9-3 with a prerelease of the
GNU C compiler version 4.1. It said

1.

xap_UnixPSGraphics.cpp:1213: warning: operation on "cursor" may be undefined.

The source code is

                g_snprintf(reinterpret_cast<char *>(&hexbuf[0]), sizeof(hexbuf), "%.2X", ( static_cast<UT_Byte>( ( static_cast<float>(*cursor++) * static_cast<float>(1) +
                                                                                  static_cast<float>(*cursor++) * static_cast<float>(1) +
                                                                                  static_cast<float>(*cursor++) * static_cast<float>(1) ) /
                                                                                  static_cast<float>(3.0) )) );

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

There are no guarantees in C that arguments are evaluated left to right.
Suggest code rework.

BTW, the email address of the author [ jeff@abisource.com ] seems to
be broken.
Comment 1 Michael Meeks 2005-12-19 16:59:05 UTC
abiword is not part of OpenOffice.org; fixing compiliation problems in it should be done by the up-stream developers IMHO.
Comment 2 David Binderman 2005-12-20 08:41:05 UTC
>should be done by the up-stream developers

It looks like this bug report goes to /dev/null, unless someone finds
an email address for the upstream developers.
Comment 3 Michael Meeks 2006-01-19 12:31:55 UTC
Please re-file the bug here: http://www.abiword.com/support/bugs/, it will of course have been fixed for SL 10.1 - which compiles with gcc 4.1 anyway.
Comment 4 David Binderman 2006-01-19 16:08:14 UTC
(In reply to comment #3)
> Please re-file the bug here: http://www.abiword.com/support/bugs/, it will of
> course have been fixed for SL 10.1 - which compiles with gcc 4.1 anyway.

Sorry, no. I've already got too many Bugzilla accounts on too many systems.

I can't cope with any more. I've tried emailing the author, I've tried
telling Suse. 

Since neither of those approaches have worked, I prefer to stop
working on this bug report.




Comment 6 Petr Mladek 2007-09-07 11:03:41 UTC
Ah, I am sorry for the late response. I am not the abiword maintainer => reassing to bnc-team-gnome@forge.provo.novell.com
Comment 7 JP Rosevear 2007-11-02 18:09:39 UTC
We've had a patch for this for a while now.  Upstream the relevant code is gone in the unstable version.