Bug 113666 - missing return statement ?
Summary: missing return statement ?
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dvdrtools
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-16 09:59 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: 2004-02-05 16:25:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2004-01-16 09:59:33 UTC
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 16:25:40 UTC
thx for spotting this!


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