This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 114368 - 2 * missing return statement
2 * missing return statement
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gtk-engines (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-27 07:19 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-27 16:59:38 EDT
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-27 07:19:32 EST
Description of problem:

I just tried to compile package gtk-engines-0.12-1 from Redhat
Fedora Core 1.

The compiler said

1.


hicontrast_theme_draw.c(441): remark #1011: missing return statement
at end of non-void function "draw_thin_shadow"

The source code is

    }
}

I'm not sure what the fix is for this. Maybe change the return type
of the function to void, or add a return statement at the end of the
function definition.

2.

hicontrast_theme_draw.c(507): remark #1011: missing return statement
at end of non-void function "draw_spin_entry_shadow"

Duplicate.



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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Bart Martens 2004-01-31 18:37:42 EST
Both functions are missing "static void". It is not a problem. I
suggest to close this bug as not a bug.
Comment 2 d.binderman 2004-02-01 03:43:40 EST
>Both functions are missing "static void". 

ok good.

>It is not a problem.

If you can prove that there is no way to get to the end of 
the function, then yes.

There is a serious problem if the return value from either
of these functions gets used.

>I suggest to close this bug as not a bug.

It seems we agree on the fix.
Comment 3 Bart Martens 2004-02-11 01:51:41 EST
cd /usr/src/redhat/BUILD/gtk-engines-0.12
grep -rC 5 draw_thin_shadow *|less
grep -rC 5 draw_spin_entry_shadow *|less

I've checked again. It seems quite obvious to me that there is no
problem. Other opinions?
Comment 4 Owen Taylor 2004-02-11 08:33:45 EST
This is definitely a bug, the implicit return type of a
C function (an old deprecated feature of C) is int, not void.

TThe missing 'void' doesn't cause any problems but for the 
compiler (a random int will be returned and ignored) but the
missing static is more of a problem, since it means that
the names are leaked into the global symbol namespace.

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