From 30326a08a2e38dab3e82a9233054e67818cd2a85 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 4 Oct 2011 11:35:02 +0000 Subject: Use intptr_t instead of int when casting from and to XtPointer Fixes gcc warnings: Scrollbar.c: In function 'NotifyScroll': Scrollbar.c:955:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Text.c: In function 'HScroll': Text.c:1274:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Text.c: In function 'VScroll': Text.c:1431:31: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] TextPop.c: In function 'DoSearch': TextPop.c:808:31: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] TextPop.c: In function 'Replace': TextPop.c:942:31: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Viewport.c: In function 'ScrollUpDownProc': Viewport.c:866:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Reviewed-by: Matt Turner Signed-off-by: Guillem Jover --- src/Viewport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Viewport.c') diff --git a/src/Viewport.c b/src/Viewport.c index d8b1188..abb8961 100644 --- a/src/Viewport.c +++ b/src/Viewport.c @@ -57,6 +57,8 @@ SOFTWARE. #include #include +#include + static void ScrollUpDownProc(Widget, XtPointer, XtPointer); static void ThumbProc(Widget, XtPointer, XtPointer); static Boolean GetGeometry(Widget, Dimension, Dimension); @@ -863,7 +865,7 @@ ScrollUpDownProc(Widget widget, XtPointer closure, XtPointer call_data) { ViewportWidget w = (ViewportWidget)closure; Widget child = w->viewport.child; - int pix = (int)call_data; + int pix = (intptr_t) call_data; Position x, y; if (child == NULL) return; /* no child to scroll. */ -- cgit v1.2.3