Author: luporl Date: Mon Aug 12 17:18:20 2019 New Revision: 350902 URL: https://svnweb.freebsd.org/changeset/base/350902
Log: [ppc] avoid empty mdproc struct Avoid empty structs, that have undefined behavior in C99 and make compilers complain about it (empty struct has size 0 in C, size 1 in C++). Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D21231 Modified: head/sys/powerpc/include/proc.h Modified: head/sys/powerpc/include/proc.h ============================================================================== --- head/sys/powerpc/include/proc.h Mon Aug 12 15:54:30 2019 (r350901) +++ head/sys/powerpc/include/proc.h Mon Aug 12 17:18:20 2019 (r350902) @@ -46,6 +46,11 @@ struct mdthread { }; struct mdproc { + /* Avoid empty structs, that have undefined behavior in C99 and + * make compilers complain about it + * (empty struct has size 0 in C, size 1 in C++). + */ + long md_spare; }; #ifdef __powerpc64__ _______________________________________________ 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"