Bug 139239

Summary: many missing return statements
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: expectAssignee: Jens Petersen <petersen>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-16 01:44:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.