Bug 113666 - missing return statement ?
missing return statement ?
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dvdrtools (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-16 04:59 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-05 11:25:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2004-01-16 04:59:33 EST
Description of problem:

I just tried to compile package dvdrtools-0.1.5-1, from Redhat
Fedora Core 1.

The compiler said

drv_mmc.c(1519): warning #1011: missing return statement at end of
non-void function "close_track_mdvd"

The source code is

LOCAL int close_track_mdvd(SCSI *scgp, int track, track_t *trackp)
{
        int     ret;
        if (!is_packet(trackp))
             return (0);

        if (scsi_flush_cache(scgp) < 0) {
                 printf("Trouble flushing the cache\n");
                 return -1;
        }
        if (!is_noclose(trackp)) {
                ret = scsi_close_tr_session(scgp, 1, track, FALSE);
                wait_unit_ready(scgp, 300);
                return (ret);
        }


}

I'm not sure if it is required or not, but it would certainly be
prudent software engineering to put a return statement at the end of
the definition of the routine close_track_mdvd.


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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Harald Hoyer 2004-02-05 11:25:40 EST
thx for spotting this!

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