Bug 162376 - undefined code + reading from uninited var
Summary: undefined code + reading from uninited var
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: openoffice.org
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-03 12:17 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-04 07:56:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenOffice.org 51521 0 None None None Never

Description David Binderman 2005-07-03 12:17:33 UTC
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

1.

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)

2.

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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Caolan McNamara 2005-07-04 07:56:34 UTC
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.