Date: Sat, 28 Apr 2018 17:55:29 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333087 - head/sys/amd64/amd64 Message-ID: <201804281755.w3SHtTEV074762@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Apr 28 17:55:28 2018 New Revision: 333087 URL: https://svnweb.freebsd.org/changeset/base/333087 Log: amd64/mp_machdep.c: Fix GCC build after r333059 GCC warns about the potentially confusing use of the binary AND ('&') operator with a left operand containing an addition expression. (The confusion would be around the operator precedence between the + and & infix operators.) The warning is converted into an error with -Werror. No functional change. This construct was actually introduced in r328083, but r333059 (re)moved the closing parentheses. For reference, see http://en.cppreference.com/w/c/language/operator_precedence . Modified: head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sat Apr 28 17:43:51 2018 (r333086) +++ head/sys/amd64/amd64/mp_machdep.c Sat Apr 28 17:55:28 2018 (r333087) @@ -276,8 +276,8 @@ init_secondary(void) pc->pc_tssp = &common_tss[cpu]; pc->pc_commontssp = &common_tss[cpu]; pc->pc_rsp0 = 0; - pc->pc_pti_rsp0 = ((vm_offset_t)&pc->pc_pti_stack + - PC_PTI_STACK_SZ * sizeof(uint64_t) & ~0xful); + pc->pc_pti_rsp0 = (((vm_offset_t)&pc->pc_pti_stack + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful); pc->pc_tss = (struct system_segment_descriptor *)&gdt[NGDT * cpu + GPROC0_SEL]; pc->pc_fs32p = &gdt[NGDT * cpu + GUFS32_SEL];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804281755.w3SHtTEV074762>