summaryrefslogtreecommitdiff
path: root/net/synergy/patches/patch-ac
blob: 48a28b0ff46b3fe7daaf841dc36453895ed86fee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
$NetBSD: patch-ac,v 1.2 2009/09/19 19:14:54 tnn Exp $

Fix compile problem with gcc4.
CXWindowsScreen.cpp: In member function 'void CXWindowsScreen::openIM()':
CXWindowsScreen.cpp:990: warning: missing sentinel in function call
CXWindowsScreen.cpp:1013: warning: missing sentinel in function call
CXWindowsScreen.cpp:1022: warning: missing sentinel in function call

--- lib/platform/CXWindowsScreen.cpp.orig	2006-04-02 21:16:39.000000000 +0200
+++ lib/platform/CXWindowsScreen.cpp
@@ -26,6 +26,7 @@
 #include "CStringUtil.h"
 #include "IEventQueue.h"
 #include "TMethodEventJob.h"
+#include <stdlib.h>
 #include <cstring>
 #if X_DISPLAY_MISSING
 #	error X11 is required to build synergy
@@ -987,7 +988,7 @@ CXWindowsScreen::openIM()
 	// find the appropriate style.  synergy supports XIMPreeditNothing
 	// only at the moment.
 	XIMStyles* styles;
-	if (XGetIMValues(im, XNQueryInputStyle, &styles, NULL) != NULL ||
+	if (XGetIMValues(im, XNQueryInputStyle, &styles, (char *)NULL) != NULL ||
 		styles == NULL) {
 		LOG((CLOG_WARN "cannot get IM styles"));
 		XCloseIM(im);
@@ -1010,7 +1011,7 @@ CXWindowsScreen::openIM()
 	}
 
 	// create an input context for the style and tell it about our window
-	XIC ic = XCreateIC(im, XNInputStyle, style, XNClientWindow, m_window, NULL);
+	XIC ic = XCreateIC(im, XNInputStyle, style, XNClientWindow, m_window, (char *)NULL);
 	if (ic == NULL) {
 		LOG((CLOG_WARN "cannot create IC"));
 		XCloseIM(im);
@@ -1019,7 +1020,7 @@ CXWindowsScreen::openIM()
 
 	// find out the events we must select for and do so
 	unsigned long mask;
-	if (XGetICValues(ic, XNFilterEvents, &mask, NULL) != NULL) {
+	if (XGetICValues(ic, XNFilterEvents, &mask, (char *)NULL) != NULL) {
 		LOG((CLOG_WARN "cannot get IC filter events"));
 		XDestroyIC(ic);
 		XCloseIM(im);