Bug 162376 - undefined code + reading from uninited var
undefined code + reading from uninited var
Product: Fedora
Classification: Fedora
Component: openoffice.org (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Caolan McNamara
Depends On:
  Show dependency treegraph
Reported: 2005-07-03 08:17 EDT by David Binderman
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-07-04 03:56:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
OpenOffice.org 51521 None None None Never

  None (edit)
Description David Binderman 2005-07-03 08:17:33 EDT
Description of problem:

I just tried to compile package openoffice.org-1.9.104-2 from Redhat
Fedora Core development tree with the gcc 4.0.0 compiler and the
compiler flag -Wall.

The compiler said


thread.c:631: warning: operation on ‘i’ may be undefined

The source code is

	for (n = 0, i = HASHID(hThread); n < HashSize; n++, i = ++i % HashSize)

I agree with the compiler. Perhaps better code would be

	for (n = 0, i = HASHID(hThread); n < HashSize; n++, i = (i + 1) % HashSize)


soundlib.c:919: warning: ‘d’ is used uninitialized in this function

The source code is

    if (!d || !(ba = AuGetBucketAttributes(aud, bucket, ret_status)))
        return NULL;

Suggest initialise "d" before first use.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Caolan McNamara 2005-07-04 03:56:34 EDT
2 is in nas, which is only built to get it's headers for use elsewhere, so the
code from nas is not actually used. So we'll ignore it.

1 looks nasty, logged as http://www.openoffice.org/issues/show_bug.cgi?id=51521

Note You need to log in before you can comment on or make changes to this bug.