Discussion:
[PATCH v2] va.h: fix compile warning
(too old to reply)
Li Zhijian
2016-11-22 04:44:05 UTC
Permalink
If we specify compiling option with "-Werror=strict-prototypes", we
will get the following error:
va/va.h:294:1: error: function declaration isn't a prototype [-Werror=strict-prototypes]
typedef int (*VAPrivFunc)();

This patch declares the VAPrivFunc with parameter 'void', to make the
compiler happy.

Signed-off-by: Li Zhijian <***@intel.com>
---
va/va.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/va/va.h b/va/va.h
index 153a89b..8791906 100644
--- a/va/va.h
+++ b/va/va.h
@@ -291,7 +291,7 @@ const char *vaQueryVendorString (
VADisplay dpy
);

-typedef int (*VAPrivFunc)();
+typedef int (*VAPrivFunc)(void);

/**
* Return a function pointer given a function name in the library.
--
2.7.4
Xiang, Haihao
2016-11-22 04:57:32 UTC
Permalink
Applied.

Thanks
Haihao
Post by Li Zhijian
If we specify compiling option with "-Werror=strict-prototypes", we
va/va.h:294:1: error: function declaration isn't a prototype [-
Werror=strict-prototypes]
typedef int (*VAPrivFunc)();
This patch declares the VAPrivFunc with parameter 'void', to make the
compiler happy.
---
 va/va.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/va/va.h b/va/va.h
index 153a89b..8791906 100644
--- a/va/va.h
+++ b/va/va.h
@@ -291,7 +291,7 @@ const char *vaQueryVendorString (
     VADisplay dpy
 );
 
-typedef int (*VAPrivFunc)();
+typedef int (*VAPrivFunc)(void);
 
 /**
  * Return a function pointer given a function name in the library.
Loading...