Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2019 20:23:59 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351793 - in stable: 11/sys/mips/include 12/sys/mips/include
Message-ID:  <201909032023.x83KNx2Y094657@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/12/sys/mips/include/proc.h
Directory Properties:
  stable/12/   (props changed)

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

Modified: stable/12/sys/mips/include/proc.h
==============================================================================
--- stable/12/sys/mips/include/proc.h	Tue Sep  3 20:19:43 2019	(r351792)
+++ stable/12/sys/mips/include/proc.h	Tue Sep  3 20:23:58 2019	(r351793)
@@ -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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909032023.x83KNx2Y094657>