blob: 793bc4651cd8e502c9500e27bc0d49ee5d6dd63e [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001From cf0ffbb5c8fa167376926d12a63613f15aa7602f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 15 Aug 2022 14:50:15 -0700
4Subject: [PATCH] Fix function prototypes
5
6Clang is now erroring out on functions with out parameter types
7
8Fixes errors like
9error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
10
11Upstream-Status: Submitted [https://patchwork.kernel.org/project/linux-nfs/patch/20220816024403.2694169-2-raj.khem@gmail.com/]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 support/export/auth.c | 2 +-
15 support/export/v4root.c | 2 +-
16 support/export/xtab.c | 2 +-
17 utils/exportfs/exportfs.c | 4 ++--
18 utils/mount/network.c | 2 +-
19 5 files changed, 6 insertions(+), 6 deletions(-)
20
21diff --git a/support/export/auth.c b/support/export/auth.c
22index 03ce4b8..2d7960f 100644
23--- a/support/export/auth.c
24+++ b/support/export/auth.c
25@@ -82,7 +82,7 @@ check_useipaddr(void)
26 }
27
28 unsigned int
29-auth_reload()
30+auth_reload(void)
31 {
32 struct stat stb;
33 static ino_t last_inode;
34diff --git a/support/export/v4root.c b/support/export/v4root.c
35index c12a7d8..fbb0ad5 100644
36--- a/support/export/v4root.c
37+++ b/support/export/v4root.c
38@@ -198,7 +198,7 @@ static int v4root_add_parents(nfs_export *exp)
39 * looking for components of the v4 mount.
40 */
41 void
42-v4root_set()
43+v4root_set(void)
44 {
45 nfs_export *exp;
46 int i;
47diff --git a/support/export/xtab.c b/support/export/xtab.c
48index c888a80..e210ca9 100644
49--- a/support/export/xtab.c
50+++ b/support/export/xtab.c
51@@ -135,7 +135,7 @@ xtab_write(char *xtab, char *xtabtmp, char *lockfn, int is_export)
52 }
53
54 int
55-xtab_export_write()
56+xtab_export_write(void)
57 {
58 return xtab_write(etab.statefn, etab.tmpfn, etab.lockfn, 1);
59 }
60diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
61index 6ba615d..0897b22 100644
62--- a/utils/exportfs/exportfs.c
63+++ b/utils/exportfs/exportfs.c
64@@ -69,14 +69,14 @@ static int _lockfd = -1;
65 * need these additional lockfile() routines.
66 */
67 static void
68-grab_lockfile()
69+grab_lockfile(void)
70 {
71 _lockfd = open(lockfile, O_CREAT|O_RDWR, 0666);
72 if (_lockfd != -1)
73 lockf(_lockfd, F_LOCK, 0);
74 }
75 static void
76-release_lockfile()
77+release_lockfile(void)
78 {
79 if (_lockfd != -1) {
80 lockf(_lockfd, F_ULOCK, 0);
81diff --git a/utils/mount/network.c b/utils/mount/network.c
82index ed2f825..01ead49 100644
83--- a/utils/mount/network.c
84+++ b/utils/mount/network.c
85@@ -179,7 +179,7 @@ static const unsigned long probe_mnt3_only[] = {
86
87 static const unsigned int *nfs_default_proto(void);
88 #ifdef MOUNT_CONFIG
89-static const unsigned int *nfs_default_proto()
90+static const unsigned int *nfs_default_proto(void)
91 {
92 extern unsigned long config_default_proto;
93 /*