From: Ivan Maidanski Date: Tue, 9 Feb 2016 06:51:22 +0000 (+0300) Subject: Workaround 'identical expr on both sides of bitwise op' warning X-Git-Tag: gc7_4_4~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b84d23d19afff0d7f36d19682621750dd2042eb6;p=gc Workaround 'identical expr on both sides of bitwise op' warning (Apply commit 76ec924 from 'master' branch.) * gcj_mlc.c (GC_init_gcj_malloc): Comment out "0 |" (in the expression of "0 | GC_DS_LENGTH"). * mark.c (GC_obj_kinds, GC_push_marked, GC_push_unconditionally): Likewise. --- diff --git a/gcj_mlc.c b/gcj_mlc.c index 9be948b9..0ab4e8f2 100644 --- a/gcj_mlc.c +++ b/gcj_mlc.c @@ -101,7 +101,7 @@ GC_API void GC_CALL GC_init_gcj_malloc(int mp_index, /* Use a simple length-based descriptor, thus forcing a fully */ /* conservative scan. */ GC_gcj_kind = GC_new_kind_inner((void **)GC_gcjobjfreelist, - (0 | GC_DS_LENGTH), + /* 0 | */ GC_DS_LENGTH, TRUE, TRUE); } else { GC_gcj_kind = GC_new_kind_inner( diff --git a/mark.c b/mark.c index 869265fc..5cb3fede 100644 --- a/mark.c +++ b/mark.c @@ -48,25 +48,26 @@ GC_INNER unsigned GC_n_mark_procs = GC_RESERVED_MARK_PROCS; /* It's done here, since we need to deal with mark descriptors. */ GC_INNER struct obj_kind GC_obj_kinds[MAXOBJKINDS] = { /* PTRFREE */ { &GC_aobjfreelist[0], 0 /* filled in dynamically */, - 0 | GC_DS_LENGTH, FALSE, FALSE + /* 0 | */ GC_DS_LENGTH, FALSE, FALSE /*, */ OK_DISCLAIM_INITZ }, /* NORMAL */ { &GC_objfreelist[0], 0, - 0 | GC_DS_LENGTH, /* Adjusted in GC_init for EXTRA_BYTES */ + /* 0 | */ GC_DS_LENGTH, + /* adjusted in GC_init for EXTRA_BYTES */ TRUE /* add length to descr */, TRUE /*, */ OK_DISCLAIM_INITZ }, /* UNCOLLECTABLE */ { &GC_uobjfreelist[0], 0, - 0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE + /* 0 | */ GC_DS_LENGTH, TRUE /* add length to descr */, TRUE /*, */ OK_DISCLAIM_INITZ }, # ifdef ATOMIC_UNCOLLECTABLE /* AUNCOLLECTABLE */ { &GC_auobjfreelist[0], 0, - 0 | GC_DS_LENGTH, FALSE /* add length to descr */, FALSE + /* 0 | */ GC_DS_LENGTH, FALSE /* add length to descr */, FALSE /*, */ OK_DISCLAIM_INITZ }, # endif # ifdef STUBBORN_ALLOC /*STUBBORN*/ { (void **)&GC_sobjfreelist[0], 0, - 0 | GC_DS_LENGTH, TRUE /* add length to descr */, TRUE + /* 0 | */ GC_DS_LENGTH, TRUE /* add length to descr */, TRUE /*, */ OK_DISCLAIM_INITZ }, # endif }; @@ -1753,7 +1754,7 @@ STATIC void GC_push_marked(struct hblk *h, hdr *hhdr) mse * mark_stack_limit = GC_mark_stack_limit; /* Some quick shortcuts: */ - if ((0 | GC_DS_LENGTH) == descr) return; + if ((/* 0 | */ GC_DS_LENGTH) == descr) return; if (GC_block_empty(hhdr)/* nothing marked */) return; GC_n_rescuing_pages++; GC_objects_are_marked = TRUE; @@ -1811,7 +1812,7 @@ STATIC void GC_push_marked(struct hblk *h, hdr *hhdr) mse * GC_mark_stack_top_reg; mse * mark_stack_limit = GC_mark_stack_limit; - if ((0 | GC_DS_LENGTH) == descr) + if ((/* 0 | */ GC_DS_LENGTH) == descr) return; GC_n_rescuing_pages++;