On Thursday, May 29, 2014 18:04 CEST, Philip Guenther <[email protected]> wrote: > On Thu, May 29, 2014 at 3:35 AM, Sebastian Reitenbach < > [email protected]> wrote: > > > On Thursday, May 29, 2014 10:19 CEST, Matthieu Herrb <[email protected]> > > wrote: > > > ... > > > after setting a breakpoint on xf86CVTMode, I stepped through it, and > > at the end, Mode was: > > > > (gdb) > > 295 return Mode; > > (gdb) print Mode > > $3 = (DisplayModeRec *) 0x3bc16033800 > > > > Full 64bit pointer there... > > > NVPreInit (pScrn=0x3bc16035800, flags=0) at > > /home/xenocara/driver/xf86-video-nv/src/nv_driver.c:1929 > > 1929 Mode->type = M_T_DRIVER; > > (gdb) print Mode > > $5 = 0x16033800 > > > > But just a 32bit value here. That's almost certainly a sign that > nv_driver.c isn't pulling in the header where xf86CVTMode() is declared, > resulting it being treated as returning an int. Perhaps compile with > -Wmissing-prototypes to confirm and see whether there are other cases...
Doh! I compared both values, and didn't saw the second one is shorter :( Anyways, with -Wmissing-prototypes I got warning as you suspected, and I also checked the savage driver, where I got the same warning. patch below fixes NV for me, and gets rid of the same warning in the savage driver. Either OK? or take it as inspiration for a better fix ;) thanks for the help, Sebastian Index: xf86-video-nv/src/nv_driver.c =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-nv/src/nv_driver.c,v retrieving revision 1.16 diff -u -p -u -r1.16 nv_driver.c --- xf86-video-nv/src/nv_driver.c 18 Nov 2013 19:45:41 -0000 1.16 +++ xf86-video-nv/src/nv_driver.c 29 May 2014 17:17:16 -0000 @@ -32,6 +32,7 @@ #include "xf86int10.h" #include "vbeModes.h" +#include "xf86Modes.h" const OptionInfoRec * RivaAvailableOptions(int chipid, int busid); Bool RivaGetScrnInfoRec(PciChipsets *chips, int chip); Index: xf86-video-savage/src/savage_driver.c =================================================================== RCS file: /cvs/xenocara/driver/xf86-video-savage/src/savage_driver.c,v retrieving revision 1.9 diff -u -p -u -r1.9 savage_driver.c --- xf86-video-savage/src/savage_driver.c 12 May 2013 13:06:25 -0000 1.9 +++ xf86-video-savage/src/savage_driver.c 29 May 2014 17:18:14 -0000 @@ -54,6 +54,7 @@ #include "xf86xv.h" +#include "xf86Modes.h" #include "savage_driver.h" #include "savage_pciids.h"

