summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-05-08 04:50:56 +0800
committerChromeBot <chrome-bot@google.com>2013-05-07 20:59:53 -0700
commit5007bbc009ccc8c8e64fac5f5540c85573d4ae80 (patch)
treeb0e7f1c5d4bd2ec286d8866759711b30cb5345a2 /core
parent235e6e1d0d713ddad79fa77d6982c006378053cd (diff)
downloadchrome-ec-5007bbc009ccc8c8e64fac5f5540c85573d4ae80.tar.gz
Use uintptr_t when converting integer from/to pointer
Perviously we use uint32_t for this, but this doesn't compile for 64-bit environment (and likely doesn't for 16-bit either.) Use uintptr_t so that we don't get size mismatch errors. BUG=chrome-os-partner:19257 TEST=Run host emulated tests BRANCH=None Change-Id: I3cd66a745fa171c41a5f142514284ec106586acb Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50358 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/host/build.mk2
-rw-r--r--core/host/task.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/host/build.mk b/core/host/build.mk
index 879b9266fa..121ef98272 100644
--- a/core/host/build.mk
+++ b/core/host/build.mk
@@ -6,6 +6,6 @@
# emulator specific files build
#
-CFLAGS_CPU=-fno-builtin -m32
+CFLAGS_CPU=-fno-builtin
core-y=main.o task.o timer.o panic.o disabled.o
diff --git a/core/host/task.c b/core/host/task.c
index caad622778..2049320e04 100644
--- a/core/host/task.c
+++ b/core/host/task.c
@@ -198,7 +198,7 @@ int task_start(void)
tasks[i].wake_time.val = ~0ull;
pthread_cond_init(&tasks[i].resume, NULL);
pthread_create(&tasks[i].thread, NULL, _task_start_impl,
- (void *)(size_t)i);
+ (void *)(uintptr_t)i);
pthread_cond_wait(&scheduler_cond, &run_lock);
}