flagging implicit function declarations as errors (was: [PATCH] pci: Restore pciTag as a deprecated function)

Jeremy Huddleston jeremyhu at apple.com
Sun Oct 30 11:56:29 PDT 2011


On Oct 20, 2011, at 15:22, Alan Coopersmith wrote:

> I do see some warnings in build logs that it would turn into errors, and they
> all seem to be in drivers, and frankly, only the first two of them do I really
> care about:
> 
> "radeon_accel.c", line 433: warning: implicit function declaration: drmCommandWriteRead
> "mga_driver.c", line 3816: warning: implicit function declaration: xf86ModeBandwidth
> "mga_vga.c", line 65: warning: implicit function declaration: usleep
> "vmodes.c", line 257: warning: implicit function declaration: usleep
> "s3_Ti.c", line 446: warning: implicit function declaration: usleep
> "s3v_accel.c", line 334: warning: implicit function declaration: usleep
> "sis_driver.c", line 9325: warning: implicit function declaration: miPointerAbsoluteCursor
> "voodoo_driver.c", line 898: warning: implicit function declaration: VoodooRestorePassThrough
> "xgi_cursor.c", line 241: warning: implicit function declaration: vWaitCRT1VerticalRetrace
> "xgi_cursor.c", line 242: warning: implicit function declaration: XGIDumpMMIO
> "xgi_driver.c", line 507: warning: implicit function declaration: LoaderRefSymLists
> "xgi_driver.c", line 655: warning: implicit function declaration: XGISetDPMS
> "xgi_driver.c", line 1616: warning: implicit function declaration: bGetEDID
> "xgi_driver.c", line 1684: warning: implicit function declaration: xf86LoaderReqSymLists
> "xgi_driver.c", line 2950: warning: implicit function declaration: open
> "xgi_driver.c", line 4484: warning: implicit function declaration: Volari_SetDefaultIdleWait
> "xgi_driver.c", line 4643: warning: implicit function declaration: XGISetModeNew
> "xgi_setup.c", line 638: warning: implicit function declaration: XGI_New_GetVBType

I've cleaned up most of the implicit declarations that you mentioned above and others that I found with recent server changes.  The xgi driver is fubar.  It looks like it hasn't worked in half a decade, so it's not really worth my effort to touch it if nobody's even going to use it.

There are others that you may care about in the sunleo driver which I leave to you to address how you see fit:

leo_fspans.c:68:3: error: implicit declaration of function 'miFindMaxBand' [-Werror=implicit-function-declaration]
leo_fspans.c:77:3: error: implicit declaration of function 'miClipSpans' [-Werror=implicit-function-declaration]
leo_fspanssp.c:69:3: error: implicit declaration of function 'miFindMaxBand' [-Werror=implicit-function-declaration]
leo_fspanssp.c:78:3: error: implicit declaration of function 'miClipSpans' [-Werror=implicit-function-declaration]

See the following related server commits:

commit bd0e87c74789bd5447ec731aa2d2d6e05dd54abc
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Oct 3 17:13:10 2008 -0400

    Remove a bunch of unused API from the mi export list.

commit 14d98b4a2fdea4a4f5cc9b751151672cb392fba3
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Oct 3 17:21:16 2008 -0400

    miFindMaxBand is dead code

commit 9b6f5f549dfe4c20e3cb3c2ef7095ab47abaca3b
Author: Keith Packard <keithp at keithp.com>
Date:   Fri May 21 11:14:59 2010 -0700

    Change region implementation names to eliminate the 'mi' prefix
    
    This prepares the file to be moved from mi to dix. This patch
    was done mechanically with the included scripts 'fix-miregion' run over
    the entire X server and 'fix-miregion-private' run over
    include/regionstr.h and mi/miregion.c.
    
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

commit dae24abcd44f3bb1966faa88222f851c784b37dc
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Mon Feb 28 11:10:38 2011 -0500

    Delete RegionClipSpans()
    
    Nothing uses it.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Søren Sandmann Pedersen <ssp at redhat.com>



More information about the xorg-devel mailing list