From ec8b2081d384bc8937e22f99af35c165f60316f5 Mon Sep 17 00:00:00 2001 From: Martin Lindhe Date: Wed, 16 Nov 2016 16:32:19 +0100 Subject: [PATCH] macho: Improve macho_calculate_sizes pvs-studio error 'V629 Consider inspecting the '1 << s->align' expression. Bit shifting of the 32-bit value with a subsequent expansion to the 64-bit type.' Signed-off-by: Martin Lindhe Signed-off-by: Cyrill Gorcunov --- output/outmacho.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/outmacho.c b/output/outmacho.c index 32080551..a6a16de6 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1109,7 +1109,7 @@ static void macho_calculate_sizes (void) if (s->align == -1) s->align = DEFAULT_SECTION_ALIGNMENT; - newaddr = ALIGN(s->addr, 1 << s->align); + newaddr = ALIGN(s->addr, 1L << s->align); s->addr = newaddr; seg_vmsize = newaddr + s->size;