mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-24 19:00:23 +08:00
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 <martin-commit@ubique.se> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
d551b431a1
commit
ec8b2081d3
@ -1109,7 +1109,7 @@ static void macho_calculate_sizes (void)
|
|||||||
if (s->align == -1)
|
if (s->align == -1)
|
||||||
s->align = DEFAULT_SECTION_ALIGNMENT;
|
s->align = DEFAULT_SECTION_ALIGNMENT;
|
||||||
|
|
||||||
newaddr = ALIGN(s->addr, 1 << s->align);
|
newaddr = ALIGN(s->addr, 1L << s->align);
|
||||||
s->addr = newaddr;
|
s->addr = newaddr;
|
||||||
|
|
||||||
seg_vmsize = newaddr + s->size;
|
seg_vmsize = newaddr + s->size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user