Author: kevans
Date: Tue Sep  3 20:23:58 2019
New Revision: 351793
URL: https://svnweb.freebsd.org/changeset/base/351793

Log:
  MFC r351227: mips: avoid empty mdproc struct
  
  Compiling with a more modern toolchain than GCC 4.2 in base warns about the
  empty struct. Take a hint and comment from r350902+r350953 by luporl@.

Modified:
  stable/11/sys/mips/include/proc.h
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/mips/include/proc.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/mips/include/proc.h
==============================================================================
--- stable/11/sys/mips/include/proc.h   Tue Sep  3 20:19:43 2019        
(r351792)
+++ stable/11/sys/mips/include/proc.h   Tue Sep  3 20:23:58 2019        
(r351793)
@@ -76,7 +76,8 @@ struct mdthread {
 #define        MDTD_COP2USED   0x0002          /* Process used the COP2 */
 
 struct mdproc {
-       /* empty */
+       /* Avoid empty structs because they are undefined behavior. */
+       long    md_spare;
 };
 
 struct syscall_args {
_______________________________________________
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