Bug 111280 - undefined source code & used before set
Summary: undefined source code & used before set
Keywords:
Status: CLOSED DUPLICATE of bug 106308
Alias: None
Product: Fedora
Classification: Fedora
Component: timidity++
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Thomas Woerner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-01 18:29 UTC by d.binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:00:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2003-12-01 18:29:21 UTC
Description of problem:
I just tried to compile package timidity++-2.11.3-8 from Fedora.

The compiler said

1.

resample.c:990: warning: operation on `dest' may be undefined
resample.c:991: warning: operation on `dest' may be undefined

The source code is

  *dest++ = *(dest - 1) / 2;
  *dest++ = *(dest - 1) / 2;

This source code is undefined. Better source code is

  *dest = *(dest - 1) / 2;
  ++dest;
  *dest = *(dest - 1) / 2;
  ++dest;

2.

playmidi.c(4667): remark #592: variable "rc" is used before its value
is set

The source code is

    int rc;
    static int play_count = 0;

    if (play_mode->id_character == 'm') {
        int cnt;

        convert_mod_to_midi_file(eventlist);

        play_count = 0;
        cnt = free_global_mblock();     /* free unused memory */
        if(cnt > 0)
            ctl->cmsg(CMSG_INFO, VERB_VERBOSE,
                      "%d memory blocks are free", cnt);
        return rc;
    }

Suggest initialise rc before first use.



Version-Release number of selected component (if applicable):
timidity++-2.11.3-8 

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Thomas Woerner 2004-04-22 13:28:55 UTC

*** This bug has been marked as a duplicate of 106308 ***

Comment 2 Red Hat Bugzilla 2006-02-21 19:00:14 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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