Author: kevans
Date: Mon Aug 19 18:15:17 2019
New Revision: 351227
URL: https://svnweb.freebsd.org/changeset/base/351227

Log:
  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:
  head/sys/mips/include/proc.h

Modified: head/sys/mips/include/proc.h
==============================================================================
--- head/sys/mips/include/proc.h        Mon Aug 19 17:54:40 2019        
(r351226)
+++ head/sys/mips/include/proc.h        Mon Aug 19 18:15:17 2019        
(r351227)
@@ -79,7 +79,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-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to