Bug 110766

Summary: obsolete source code
Product: [Fedora] Fedora Reporter: d.binderman
Component: Xaw3dAssignee: Than Ngo <than>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: d.binderman
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-30 13:47:48 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 d.binderman 2003-11-24 15:10:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:
I just tried to compile package Xaw3d-1_5-19, and I noticed that
the compiler said the following

Scrollbar.c(1259): warning #165: too few arguments in function call

The source code is

    PaintThumb (sbw);

if we grep for that routine in the file Scrollbar.c, then we find

grep PaintThumb ../BUILD/Xaw3d-1.5/xc/lib/Xaw3d6/Scrollbar.c
static void PaintThumb (sbw, event)
        PaintThumb (sbw, event);
    PaintThumb (sbw, event);
    PaintThumb (sbw);

We can see clearly that the third and final call to PaintThumb
is missing a second parameter called event.

Further, if we look at the definition of the routine PaintThumb

static void PaintThumb (sbw, event)
    ScrollbarWidget sbw;
    XEvent *event;
{

then we can see that this is a K&R style function definition.  This 
style
of definition has been deprecated for about fifteen years now. I would
strongly encourage a conversion to ISO C function definition.



Version-Release number of selected component (if applicable):
Xaw3d-1_5-19

How reproducible:
Always

Steps to Reproduce:
1. by inspection
2.
3.
    

Additional info:

Comment 1 Than Ngo 2003-11-26 19:01:41 UTC
>Scrollbar.c(1259): warning #165: too few arguments in function call
it's fixed in 1.5-20

>then we can see that this is a K&R style function definition.  This 
>style of definition has been deprecated for about fifteen years now.
I >would strongly encourage a conversion to ISO C function definition.

yes i know ;-) but don't know if i have time to do this conversion.


Comment 2 d.binderman 2003-11-27 10:05:03 UTC
>yes i know ;-) but don't know if i have time to do this conversion.

An ounce of prevention is worth a pound of cure.

I strongly recommend finding the time - it will save more
time later on in the product's lifetime.


Comment 3 Than Ngo 2004-11-30 13:47:48 UTC
it's now fixed in 1.5E-1, which will be show up in rawhide soon.
Thanks for your report.