Bug 136088 - missing return stmt + reading uninit local var
Summary: missing return stmt + reading uninit local var
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cdrtools
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-17 19:39 UTC by David Binderman
Modified: 2008-05-07 00:01 UTC (History)
3 users (show)

Fixed In Version: 2.01.1-5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-07 00:01:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2004-10-17 19:39:44 UTC
Description of problem:

I just tried to compile package cdrtools-2.01.1-3 from
Redhat Fedora Core 3 Test 3.

The compiler said

1.

scsitransp.c(1257): warning #1011: missing return statement at end of
non-void function "scg_sense_table"

The source code is

EXPORT unsigned char *
scg_sense_table(scgp)
        SCSI    *scgp;
{
        register struct scg_cmd *cp = scgp->scmd;

        if(!scg_cmd_err(scgp))
                return (0);

        if (cp->sense.code >= 0x70)
        return &(cp->sense);
}

Suggest add return statement at end of routine.

2.

drv_mmc.c(2803): remark #592: variable "ret" is used before its value
is set

                return ret;

But

        int     ret;

Suggest init ret at it's declaration.



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


How reproducible:


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


Expected results:


Additional info:

Comment 1 David Binderman 2005-03-09 14:17:25 UTC
The second part of this bug report is still broken in the
current version of Wed 9 March 2005.


Comment 2 Matthew Miller 2006-07-10 22:57:21 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


Comment 3 Bug Zapper 2008-04-03 15:41:58 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 4 Bug Zapper 2008-05-07 00:01:38 UTC
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp


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