From 9e002dfcd71439fd81563db1f70e8c1964d52fab Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 9 Dec 2014 18:27:11 -0800 Subject: Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls Use typedefs to work around dtrace dropping const qualifiers from probe arguments when generating Xserver-dtrace.h. Add new probes.h header to avoid having to replicate these typedefs in every file with dtrace probes. Gets rid of these warnings from gcc 4.8: getevents.c:1096:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' discards 'const' qualifier from pointer target type [enabled by default] getevents.c:1096:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer --- os/connection.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'os') diff --git a/os/connection.c b/os/connection.c index da3397da6..ddfe50a3e 100644 --- a/os/connection.c +++ b/os/connection.c @@ -113,17 +113,11 @@ SOFTWARE. #ifdef HAVE_GETPEERUCRED #include #include -#endif - -#ifdef XSERVER_DTRACE -#include -typedef const char *string; - -#ifndef HAVE_GETPEERUCRED +#else #define zoneid_t int #endif -#include "../dix/Xserver-dtrace.h" -#endif + +#include "probes.h" static int lastfdesc; /* maximum file descriptor */ -- cgit v1.2.3