Re: macppc: ansify some code (fix clang 15 errors)

2022-12-26 Thread Todd C . Miller
On Tue, 27 Dec 2022 03:20:55 +0100, Jeremie Courreges-Anglas wrote:

> This should fix warnings in the macppc build (kernel + bootloader) with
> clang 15 (-Wdeprecated-non-prototype).  Not build tested (no macppc
> machine at hand) but should be safe.  ok?

OK millert@

 - todd



macppc: ansify some code (fix clang 15 errors)

2022-12-26 Thread Jeremie Courreges-Anglas


This should fix warnings in the macppc build (kernel + bootloader) with
clang 15 (-Wdeprecated-non-prototype).  Not build tested (no macppc
machine at hand) but should be safe.  ok?


Index: arch/macppc/dev/pm_direct.c
===
RCS file: /home/cvs/src/sys/arch/macppc/dev/pm_direct.c,v
retrieving revision 1.33
diff -u -p -r1.33 pm_direct.c
--- arch/macppc/dev/pm_direct.c 23 Oct 2022 08:00:10 -  1.33
+++ arch/macppc/dev/pm_direct.c 27 Dec 2022 02:14:20 -
@@ -200,11 +200,7 @@ extern voidadb_pass_up(struct adbComman
  * This function dumps contents of the PMData
  */
 void
-pm_printerr(ttl, rval, num, data)
-   char *ttl;
-   int rval;
-   int num;
-   char *data;
+pm_printerr(char *ttl, int rval, int num, char *data)
 {
int i;
 
Index: arch/macppc/stand/ofdev.c
===
RCS file: /home/cvs/src/sys/arch/macppc/stand/ofdev.c,v
retrieving revision 1.28
diff -u -p -r1.28 ofdev.c
--- arch/macppc/stand/ofdev.c   12 Oct 2022 09:23:45 -  1.28
+++ arch/macppc/stand/ofdev.c   27 Dec 2022 02:15:09 -
@@ -164,8 +164,7 @@ struct fs_ops file_system[4];
 int nfsys;
 
 static u_long
-get_long(p)
-   const void *p;
+get_long(const void *p)
 {
const unsigned char *cp = p;
 
@@ -238,12 +237,8 @@ read_mac_label(struct of_dev *devp, char
  * Find a valid disklabel.
  */
 static int
-search_label(devp, off, buf, lp, off0)
-   struct of_dev *devp;
-   u_long off;
-   char *buf;
-   struct disklabel *lp;
-   u_long off0;
+search_label(struct of_dev *devp, u_long off, char *buf, struct disklabel *lp,
+u_long off0)
 {
size_t read;
struct dos_partition *p;


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE