From b8825127fdca3f492ba4f57bfa0752fd4dabb5a7 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 11 Oct 2018 22:37:26 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20parentheses=20around=20=E2=80=98+?= =?UTF-8?q?=E2=80=99=20in=20operand=20of=20=E2=80=98&=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` Core/z80_cpu.c: In function ‘add_hl_rr’: Core/z80_cpu.c:341:31: error: suggest parentheses around ‘+’ in operand of ‘&’ [-Werror=parentheses] if ( ((unsigned long) hl) + ((unsigned long) rr) & 0x10000) { ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ``` --- Core/z80_cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/z80_cpu.c b/Core/z80_cpu.c index e187c3e..705fefe 100644 --- a/Core/z80_cpu.c +++ b/Core/z80_cpu.c @@ -338,7 +338,7 @@ static void add_hl_rr(GB_gameboy_t *gb, uint8_t opcode) gb->registers[GB_REGISTER_AF] |= GB_HALF_CARRY_FLAG; } - if ( ((unsigned long) hl) + ((unsigned long) rr) & 0x10000) { + if ( ((unsigned long) hl) + (((unsigned long) rr) & 0x10000)) { gb->registers[GB_REGISTER_AF] |= GB_CARRY_FLAG; } }