summaryrefslogtreecommitdiff
path: root/test/stdlib/teststrtol.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-30 23:46:27 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-30 23:46:27 +0000
commitb9cf3835367a7005693419fb06a2402a68176c1f (patch)
treedf5df88219278350346b4aa8c40e3a1334b66ed2 /test/stdlib/teststrtol.c
parent6a986cd382b94d27cfcd988dc457e73f9f43bf1f (diff)
fix type casting so we dont have any warnings on 32/64 bit arches
Diffstat (limited to 'test/stdlib/teststrtol.c')
-rw-r--r--test/stdlib/teststrtol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/stdlib/teststrtol.c b/test/stdlib/teststrtol.c
index d015b81b2..e959b4990 100644
--- a/test/stdlib/teststrtol.c
+++ b/test/stdlib/teststrtol.c
@@ -89,8 +89,8 @@ void do_test(int base)
for(i=0;i<n_tests;i++){
n=strtol(strings[i],&endptr,base);
- printf("strtol(\"%s\",%d) len=%d res=%ld\n",
- strings[i],base,endptr-strings[i],n);
+ printf("strtol(\"%s\",%d) len=%lu res=%ld\n",
+ strings[i],base,(unsigned long)(endptr-strings[i]),n);
}
}
@@ -102,8 +102,8 @@ void do_utest(int base)
for(i=0;i<n_tests;i++){
n=strtoul(strings[i],&endptr,base);
- printf("strtoul(\"%s\",%d) len=%d res=%lu\n",
- strings[i],base,endptr-strings[i],n);
+ printf("strtoul(\"%s\",%d) len=%lu res=%lu\n",
+ strings[i],base,(unsigned long)(endptr-strings[i]),n);
}
}