summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-03 20:06:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-03 20:09:41 -0800
commitd065113b4fadbb674e6e6f2a7681105f4f0212d3 (patch)
treed4bbeaab9249fa38885040424999dec04ae6c60e
parent99ca5c8deb4a3ebd4b2a7e64bd64ca9a91b6680c (diff)
Fix some 64-bit vs. 32-bit conversion errors
ico.c:851:7: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] fg = WhitePixel(dpy, DefaultScreen(dpy)); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ico.c:852:7: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] bg = BlackPixel(dpy, DefaultScreen(dpy)); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ico.c:858:18: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] bg = cdef.pixel; ~ ~~~~~^~~~~ ico.c:866:18: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] fg = cdef.pixel; ~ ~~~~~^~~~~ ico.c:874:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32] bg = tmp; Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--ico.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ico.c b/ico.c
index 10c8c5e..059ee0e 100644
--- a/ico.c
+++ b/ico.c
@@ -720,7 +720,8 @@ drawPoly(struct closure *closure, Polyinfo *poly, GC gc,
}
static void
-initDBufs(struct closure *closure, int fg, int bg, int planesperbuf)
+initDBufs(struct closure *closure, unsigned long fg, unsigned long bg,
+ int planesperbuf)
{
int i,j,jj,j0,j1,k,m,t;
DBufInfo *b;
@@ -819,7 +820,7 @@ setBufColname(struct closure *closure, int n, const char *colname)
static void *
do_ico_window(void *ptr)
{
- int fg, bg;
+ unsigned long fg, bg;
XSetWindowAttributes xswa;
XWindowAttributes xwa;
XEvent xev;