Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-08-21 11:45:57 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-08-21 11:57:43 +0400
commit2c23fbee16d82b05c69588d83d52b17d107d8eb3 (patch)
tree356cba3b857f6f9f9dd8c0376ff3904b1c3b40fb /mallocx.c
parent00d105946fc3b7d424a2d017288feb72e2c80849 (diff)
Resolve "comparison of signed and unsigned values" compiler warnings.
* allchblk.c (GC_allochblk_nth): Cast MAX_BLACK_LIST_ALLOC and HBLKSIZE to signed_word. * mallocx.c (GC_generic_malloc_many): Cast my_bytes_allocd to word. * mark.c (GC_do_local_mark): Cast the result of local_top minus local_mark_stack to word (since is non-negative). * misc.c (GC_base): Declare sz as unsigned word. * misc.c (GC_enable_incremental): Cast bytes_written to size_t in comparison to len. * obj_map.c (GC_initialize_offsets): Declare 'i' as unsigned. * os_dep.c (GC_or_pages): Ditto. * typd_mlc.c (GC_init_explicit_typing): Ditto. * ptr_chck.c (GC_is_visible): Cast the result of p minus base to word. * typd_mlc.c (GC_make_descriptor): Cast last_set_bit to word (since non-negative) when compared to BITMAP_BITS.
Diffstat (limited to 'mallocx.c')
-rw-r--r--mallocx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mallocx.c b/mallocx.c
index d92014c9..e5928358 100644
--- a/mallocx.c
+++ b/mallocx.c
@@ -377,7 +377,7 @@ GC_API void GC_CALL GC_generic_malloc_many(size_t lb, int k, void **result)
my_bytes_allocd = 0;
for (p = op; p != 0; p = obj_link(p)) {
my_bytes_allocd += lb;
- if (my_bytes_allocd >= HBLKSIZE) {
+ if ((word)my_bytes_allocd >= HBLKSIZE) {
*opp = obj_link(p);
obj_link(p) = 0;
break;