From cd066637f50d6dcf70021c87a8ee91ce5ac1e9d5 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 3 Dec 2007 15:13:46 +0000 Subject: [PATCH] fixed unary minus on unsigned warning [r16870] --- ir/ir/irprofile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ir/ir/irprofile.c b/ir/ir/irprofile.c index c6595d149..8cc237917 100644 --- a/ir/ir/irprofile.c +++ b/ir/ir/irprofile.c @@ -395,13 +395,13 @@ ir_profile_instrument(const char *filename, unsigned flags) align_n = get_type_size_bytes(charptr_type); set_type_alignment_bytes(charptr_type, align_n); loc_name = new_entity(loc_type, IDENT("name"), charptr_type); - size = (size + align_n - 1) & -align_n; + size = (size + align_n - 1) & ~(align_n - 1); set_entity_offset(loc_name, size); size += align_n; if (align_n > align_l) align_l = align_n; - size = (size + align_l - 1) & -align_l; + size = (size + align_l - 1) & ~(align_l - 1); set_type_size_bytes(loc_type, size); set_type_state(loc_type, layout_fixed); -- 2.20.1