diff mbox

intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99

Message ID CA+icZUXeTbAPHG3tOKN6HYscmHJ8WfXtgaYiXFfM3P2pC-87Tg@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sedat Dilek Sept. 13, 2014, 5:27 p.m. UTC
On Sat, Sep 13, 2014 at 7:15 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> Building intel-ddx from GIT HEAD breaks here with LLVM v3.4.2 like this...
> ...
> intel_driver.c:1182:2: error: implicit declaration of function
> 'intel_sync_close' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
>         intel_sync_close(screen);
>         ^
> In file included from intel_uxa.c:44:
> ./intel_glamor.h:92:1: warning: unused function
> 'intel_glamor_fd_from_pixmap' [-Wunused-function]
> intel_glamor_fd_from_pixmap(ScreenPtr screen,
> ^
> intel_driver.c:1182:2: note: did you mean 'intel_mode_close'?
> ./intel.h:356:13: note: 'intel_mode_close' declared here
> extern void intel_mode_close(intel_screen_private *intel);
>             ^
> ...
>
> Please have a look at the full build-log.
> Thanks.
>
> - Sedat -
>
> P:S:: GIT HEAD is here...
>
> commit 48f6406a62c06a09b173d82b8eb79761188ff717 ("Use intel_uxa.h in
> all uxa-specific files")
>
> P.S.S.: FYI... v2.99.916 is OK.

Looking at the sources...

./src/uxa/intel.h-516-#if HAVE_DRI3
./src/uxa/intel.h-517-Bool intel_sync_init(ScreenPtr screen);
./src/uxa/intel.h:518:void intel_sync_close(ScreenPtr screen);
./src/uxa/intel.h-519-#endif

...and in my logs...

$ grep DRI3 ../logs/build-and-install-log_XF86-Video-Intel-v2-99-916-38-g48f6406_llvm-3-4-2.txt
checking for X11_DRI3... yes
checking if DRI3 is defined... no
checking whether to include DRI3 support... no

Then intel_sync_close() should be embedded into a HAVE_DRI3 check?

$ git diff
Regards,
- Sedat -
diff mbox

Patch

diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index f31f7bd..9f527fd 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -1179,7 +1179,9 @@  static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
                intel->dri3 = DRI_NONE;
        }

+#if HAVE_DRI3
        intel_sync_close(screen);
+#endif

        xf86GARTCloseScreen(scrn->scrnIndex);