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];
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to