summaryrefslogtreecommitdiff
path: root/src/Scrollbar.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/Scrollbar.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/Scrollbar.c')
-rw-r--r--src/Scrollbar.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Scrollbar.c b/src/Scrollbar.c
index 98aac74..429a660 100644
--- a/src/Scrollbar.c
+++ b/src/Scrollbar.c
@@ -69,6 +69,8 @@ SOFTWARE.
#include <X11/Xmu/Drawing.h>
+#include <stdint.h>
+
/* Private definitions. */
#ifdef XAW_ARROW_SCROLLBARS
@@ -785,7 +787,7 @@ RepeatNotify(XtPointer client_data, XtIntervalId *idp)
{
#define A_FEW_PIXELS 5
ScrollbarWidget sbw = (ScrollbarWidget) client_data;
- int call_data;
+ intptr_t call_data;
if (sbw->scrollbar.scroll_mode != 1 && sbw->scrollbar.scroll_mode != 3) {
sbw->scrollbar.timer_id = (XtIntervalId) 0;
return;
@@ -874,7 +876,7 @@ static void
NotifyScroll (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
- int call_data;
+ intptr_t call_data;
Position x, y;
if (sbw->scrollbar.scroll_mode == 2 /* if scroll continuous */
@@ -920,7 +922,7 @@ static void
NotifyScroll (Widget w, XEvent *event, String *params, Cardinal *num_params)
{
ScrollbarWidget sbw = (ScrollbarWidget) w;
- int call_data;
+ intptr_t call_data;
char style;
Position x, y;