summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-09-08 12:17:26 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-09-12 12:41:04 +0200
commitcddcd3839fa6cf69a46fe30a09a5b07fb66a70d4 (patch)
treeec2c4f700e0fb57a771e39419f5de81103631e2d /tests
parenteb650a2a7697e7320ffadda1be064866a816349d (diff)
Resolve "comparison of signed and unsigned values" compiler warnings.
(Apply commit 96f7891) * cord/cordprnt.c (CORD_vsprintf): Cast "prec" and "width" local variables to size_t. * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Change type of "i" local variable to int. * pthread_support.c (start_mark_threads): Likewise. * os_dep.c (GC_repeat_read): Change type of "num_read" to size_t. * os_dep.c (GC_get_maps): Change type of "result" local variable from int to ssize_t; cast "result" to size_t in comparison. * pthread_support.c (GC_remove_all_threads_but_me): Cast "result" to int. * pthread_support.c (GC_wait_for_gc_completion): Change type of "old_gc_no" local variable to word. * pthread_support.c (GC_lock): Change type of "i" local variable to unsigned. * tests/staticrootstest.c (main): Cast sizeof() value to int in comparisons.
Diffstat (limited to 'tests')
-rw-r--r--tests/staticrootstest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/staticrootstest.c b/tests/staticrootstest.c
index 1f63fa2..222f209 100644
--- a/tests/staticrootstest.c
+++ b/tests/staticrootstest.c
@@ -41,7 +41,7 @@ int main(void)
root[i] = libsrl_mktree(12);
GC_gcollect();
}
- for (i = 0; i < sizeof(struct treenode); ++i) {
+ for (i = 0; i < (int)sizeof(struct treenode); ++i) {
if (staticroot[i] != 0x42)
return -1;
}
@@ -49,7 +49,7 @@ int main(void)
root[i] = libsrl_mktree(12);
GC_gcollect();
}
- for (i = 0; i < sizeof(struct treenode); ++i) {
+ for (i = 0; i < (int)sizeof(struct treenode); ++i) {
if (staticroot[i] != 0x42)
return -1;
}