Bug 139239 - many missing return statements
many missing return statements
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: expect (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-14 06:40 EST by David 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-11-15 20:44:43 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 David Binderman 2004-11-14 06:40:47 EST
Description of problem:

I just tried to compile package expect-5.42.1-1 from 
Redhat Fedora Core 3.

The compiler said

1.

expect.c(2018): warning #1011: missing return statement at end of
non-void function "exp_tcl2_returnvalue"

What happens if parameter x is not one of the values listed in the
switch statement ? Rubbish is returned to the caller.

Suggest add return statement at the end of the routine which does
something sensible in the case of bad data.

2.

expect.c(2034): warning #1011: missing return statement at end of
non-void function "exp_2tcl_returnvalue"

Duplicate.

3.

expect.c(2113): warning #1011: missing return statement at end of
non-void function "exp_cmdtype_printable"
expect.c(2018): warning #1011: missing return statement at end of
non-void function "exp_tcl2_returnvalue"
expect.c(2034): warning #1011: missing return statement at end of
non-void function "exp_2tcl_returnvalue"
expect.c(2113): warning #1011: missing return statement at end of
non-void function "exp_cmdtype_printable"
exp_win.c(90): warning #1011: missing return statement at end of
non-void function "exp_window_size_set"
exp_win.c(105): warning #1011: missing return statement at end of
non-void function "exp_window_size_get"
exp_win.c(152): warning #1011: missing return statement at end of
non-void function "exp_win2_size_set"
exp_win.c(163): warning #1011: missing return statement at end of
non-void function "exp_win2_size_get"
exp_win.c(90): warning #1011: missing return statement at end of
non-void function "exp_window_size_set"
exp_win.c(105): warning #1011: missing return statement at end of
non-void function "exp_window_size_get"
exp_win.c(152): warning #1011: missing return statement at end of
non-void function "exp_win2_size_set"
exp_win.c(163): warning #1011: missing return statement at end of
non-void function "exp_win2_size_get"
exp_chan.c(555): warning #1011: missing return statement at end of
non-void function "expWaitOnOne"
exp_chan.c(555): warning #1011: missing return statement at end of
non-void function "expWaitOnOne"

More of the same ?


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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Jens Petersen 2004-11-15 01:16:57 EST
Are any of the warnings due to Red Hat patches?
If not, I would like to treat this as an upstream issue.

I forwarded this issue already to the upstream Expect maintainer.
Comment 2 David Binderman 2004-11-15 04:50:47 EST
>Are any of the warnings due to Red Hat patches?

No idea.

>If not, I would like to treat this as an upstream issue.

Seems reasonable.

>I forwarded this issue already to the upstream Expect maintainer.

Good idea. Job done, as far as I can see. Suggest mark as "sent
upstream" and closed.
Comment 3 Jens Petersen 2004-11-15 20:44:43 EST
Quickly looking through our patch set suggests none of the warnings
added by them.

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