summaryrefslogtreecommitdiff
path: root/src/Text.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-10-04 11:35:02 +0000
committerMatt Turner <mattst88@gmail.com>2011-10-06 15:17:19 -0400
commit30326a08a2e38dab3e82a9233054e67818cd2a85 (patch)
tree7c09160651a2e7be815e9870717a0c25b75aa9aa /src/Text.c
parentf7d3fd257d1bf7a0313a45dccf023ed99c400da9 (diff)
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 <mattst88@gmail.com> Signed-off-by: Guillem Jover <guillem@hadrons.org>
Diffstat (limited to 'src/Text.c')
-rw-r--r--src/Text.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text.c b/src/Text.c
index 36bef53..be4d592 100644
--- a/src/Text.c
+++ b/src/Text.c
@@ -58,6 +58,7 @@ SOFTWARE.
#ifdef XAW_INTERNATIONALIZATION
#include "XawI18n.h"
#endif
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xmu/Atoms.h>
@@ -1271,7 +1272,7 @@ HScroll(Widget w, XtPointer closure, XtPointer callData)
{
TextWidget ctx = (TextWidget) closure;
Widget tw = (Widget) ctx;
- Position old_left, pixels = (Position)(int) callData;
+ Position old_left, pixels = (Position)(intptr_t) callData;
XRectangle rect, t_rect;
int s = ((ThreeDWidget)ctx->text.threeD)->threeD.shadow_width;
@@ -1428,7 +1429,7 @@ static void
VScroll(Widget w, XtPointer closure, XtPointer callData)
{
TextWidget ctx = (TextWidget)closure;
- int height, nlines, lines = (int) callData;
+ int height, nlines, lines = (intptr_t) callData;
height = ctx->core.height - VMargins(ctx);
if (height < 1)