summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-01-04 06:07:10 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2011-01-04 06:07:10 (GMT)
commite40b93c7df6d606ff681c13498be42f63beeb787 (patch)
tree93068b964fa34e28a55d90d04c1764901011140f
parentc9686ce42cce59b4622370a3a5a0adc8673ab58a (diff)
downloadgrv-e40b93c7df6d606ff681c13498be42f63beeb787.zip
grv-e40b93c7df6d606ff681c13498be42f63beeb787.tar.gz
grv-e40b93c7df6d606ff681c13498be42f63beeb787.tar.bz2
grv-e40b93c7df6d606ff681c13498be42f63beeb787.tar.xz
utils.c: fix cast warning
We use the void * parameter to SDL_AddTimer for post_oneshot or post_periodic, but the real value is actually an integer. Cast it to size_t rather than int to avoid a warning; the code is correct either way.
-rw-r--r--utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils.c b/utils.c
index 1544a02..b4fe150 100644
--- a/utils.c
+++ b/utils.c
@@ -41,7 +41,7 @@ Uint32 post_periodic(Uint32 interval, void *param)
{
SDL_Event event;
event.type = SDL_USEREVENT;
- event.user.code = (int)param;
+ event.user.code = (size_t)param;
event.user.data1 = event.user.data2 = 0;
SDL_PushEvent(&event);
@@ -55,7 +55,7 @@ Uint32 post_oneshot(Uint32 interval, void *param)
{
SDL_Event event;
event.type = SDL_USEREVENT;
- event.user.code = (int)param;
+ event.user.code = (size_t)param;
event.user.data1 = event.user.data2 = 0;
(void)interval;