2022-09-16 21:48:57

by Sam James

[permalink] [raw]
Subject: [PATCH v2] Fix more function prototypes

```
regex.c:545:43: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
struct trans_func *libnfsidmap_plugin_init()
^
void
1 error generated.
```

See: 167f2336b06e1bcbf26f45f2ddc4a535fed4d393
Signed-off-by: Sam James <[email protected]>
---
support/nfsidmap/regex.c | 2 +-
utils/idmapd/idmapd.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/nfsidmap/regex.c b/support/nfsidmap/regex.c
index 958b4ac8..8424179f 100644
--- a/support/nfsidmap/regex.c
+++ b/support/nfsidmap/regex.c
@@ -542,7 +542,7 @@ struct trans_func regex_trans = {
.gss_princ_to_grouplist = regex_gss_princ_to_grouplist,
};

-struct trans_func *libnfsidmap_plugin_init()
+struct trans_func *libnfsidmap_plugin_init(void)
{
return (&regex_trans);
}
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index e79c124d..cd9a965f 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -867,7 +867,7 @@ nfsdreopen_one(struct idmap_client *ic)
}

static void
-nfsdreopen()
+nfsdreopen(void)
{
nfsdreopen_one(&nfsd_ic[IC_NAMEID]);
nfsdreopen_one(&nfsd_ic[IC_IDNAME]);
--
2.37.3


2022-09-25 04:22:52

by Sam James

[permalink] [raw]
Subject: Re: [PATCH v2] Fix more function prototypes



> On 16 Sep 2022, at 22:43, Sam James <[email protected]> wrote:
>
> ```
> regex.c:545:43: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> struct trans_func *libnfsidmap_plugin_init()
> ^
> void
> 1 error generated.
> ```
>
> See: 167f2336b06e1bcbf26f45f2ddc4a535fed4d393
> Signed-off-by: Sam James <[email protected]>
> ---
> support/nfsidmap/regex.c | 2 +-
> utils/idmapd/idmapd.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)

ping


Attachments:
signature.asc (367.00 B)
Message signed with OpenPGP

2022-09-27 14:23:53

by Steve Dickson

[permalink] [raw]
Subject: Re: [PATCH v2] Fix more function prototypes



On 9/25/22 12:10 AM, Sam James wrote:
>
>
>> On 16 Sep 2022, at 22:43, Sam James <[email protected]> wrote:
>>
>> ```
>> regex.c:545:43: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>> struct trans_func *libnfsidmap_plugin_init()
>> ^
>> void
>> 1 error generated.
>> ```
>>
>> See: 167f2336b06e1bcbf26f45f2ddc4a535fed4d393
>> Signed-off-by: Sam James <[email protected]>
>> ---
>> support/nfsidmap/regex.c | 2 +-
>> utils/idmapd/idmapd.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> ping
Thanks! Committed!

steved.