From dc2e8ca41b2f749d7208252d2f9e54f8367128a8 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 19 Nov 2005 04:45:15 +0000 Subject: [PATCH] o Include o Make this ILP32/LP64 clean: cast pointers to long. --- lib/libkse/test/guard_b.c | 8 +++++--- lib/libpthread/test/guard_b.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/libkse/test/guard_b.c b/lib/libkse/test/guard_b.c index 42bf4edd3bbb..2e2703165dd6 100644 --- a/lib/libkse/test/guard_b.c +++ b/lib/libkse/test/guard_b.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -69,9 +70,10 @@ recurse(void *args) * hand tweaking, so just print a warning rather than aborting. */ if (parms->top - (void *)&top != FRAME_SIZE * parms->cur) { - fprintf(stderr, "Stack size (%d) != expected (%d), frame %d\n", - parms->top - (void *)&top, FRAME_SIZE * parms->cur, - parms->cur); + fprintf(stderr, + "Stack size (%ld) != expected (%ld), frame %ld\n", + (long)parms->top - (long)&top, + (long)(FRAME_SIZE * parms->cur), (long)parms->cur); } parms->cur++; diff --git a/lib/libpthread/test/guard_b.c b/lib/libpthread/test/guard_b.c index 42bf4edd3bbb..2e2703165dd6 100644 --- a/lib/libpthread/test/guard_b.c +++ b/lib/libpthread/test/guard_b.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -69,9 +70,10 @@ recurse(void *args) * hand tweaking, so just print a warning rather than aborting. */ if (parms->top - (void *)&top != FRAME_SIZE * parms->cur) { - fprintf(stderr, "Stack size (%d) != expected (%d), frame %d\n", - parms->top - (void *)&top, FRAME_SIZE * parms->cur, - parms->cur); + fprintf(stderr, + "Stack size (%ld) != expected (%ld), frame %ld\n", + (long)parms->top - (long)&top, + (long)(FRAME_SIZE * parms->cur), (long)parms->cur); } parms->cur++;