Bug 139239 - many missing return statements
Summary: many missing return statements
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: expect
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-14 11:40 UTC by David 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-11-16 01:44:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2004-11-14 11:40:47 UTC
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 06:16:57 UTC
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 09:50:47 UTC
>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-16 01:44:43 UTC
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.