Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2017 20:00:25 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311933 - head/sys/boot/efi/boot1
Message-ID:  <201701112000.v0BK0Pd0043615@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Jan 11 20:00:24 2017
New Revision: 311933
URL: https://svnweb.freebsd.org/changeset/base/311933

Log:
  Use proper prototypes in struct boot_module_t
  
  With clang 4.0.0, we are getting the following warnings about struct
  boot_module_t in efi's boot_module.h:
  
  In file included from sys/boot/efi/boot1/ufs_module.c:41:
  sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
          void (*init)();
                      ^
                       void
  sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
          void (*status)();
                        ^
                         void
  sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
          dev_info_t *(*devices)();
                                ^
                                 void
  3 errors generated.
  
  Fix this by adding 'void' to the parameter lists.  No functional change.
  
  Reviewed by:	emaste, imp, smh
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D9144

Modified:
  head/sys/boot/efi/boot1/boot_module.h

Modified: head/sys/boot/efi/boot1/boot_module.h
==============================================================================
--- head/sys/boot/efi/boot1/boot_module.h	Wed Jan 11 19:59:27 2017	(r311932)
+++ head/sys/boot/efi/boot1/boot_module.h	Wed Jan 11 20:00:24 2017	(r311933)
@@ -64,7 +64,7 @@ typedef struct boot_module_t
 	const char *name;
 
 	/* init is the optional initialiser for the module. */
-	void (*init)();
+	void (*init)(void);
 
 	/*
 	 * probe checks to see if the module can handle dev.
@@ -89,10 +89,10 @@ typedef struct boot_module_t
 	    void **buf, size_t *bufsize);
 
 	/* status outputs information about the probed devices. */
-	void (*status)();
+	void (*status)(void);
 
 	/* valid devices as found by probe. */
-	dev_info_t *(*devices)();
+	dev_info_t *(*devices)(void);
 } boot_module_t;
 
 /* Standard boot modules. */



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