diff mbox series

libsemanage/tests: use strict prototypes

Message ID 20230805094418.18828-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 8e3a532880b2
Delegated to: Petr Lautrbach
Headers show
Series libsemanage/tests: use strict prototypes | expand

Commit Message

Christian Göttsche Aug. 5, 2023, 9:44 a.m. UTC
utilities.c:39:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int create_test_store() {
                         ^
                          void
    utilities.c:171:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int destroy_test_store() {
                          ^
                           void

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsemanage/tests/utilities.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

James Carter Aug. 9, 2023, 2:18 p.m. UTC | #1
On Sat, Aug 5, 2023 at 6:18 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
>     utilities.c:39:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>     int create_test_store() {
>                          ^
>                           void
>     utilities.c:171:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>     int destroy_test_store() {
>                           ^
>                            void
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsemanage/tests/utilities.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libsemanage/tests/utilities.c b/libsemanage/tests/utilities.c
> index 71d7af1e..806869e0 100644
> --- a/libsemanage/tests/utilities.c
> +++ b/libsemanage/tests/utilities.c
> @@ -36,7 +36,7 @@ void test_msg_handler(void *varg, semanage_handle_t *handle, const char *fmt,
>  {
>  }
>
> -int create_test_store() {
> +int create_test_store(void) {
>         FILE *fptr;
>
>         if (mkdir("test-policy", 0700) < 0)
> @@ -168,7 +168,7 @@ int write_test_policy_src(unsigned char *data, unsigned int data_len) {
>         return 0;
>  }
>
> -int destroy_test_store() {
> +int destroy_test_store(void) {
>         FTS *ftsp = NULL;
>         FTSENT *curr = NULL;
>         int ret = 0;
> --
> 2.40.1
>
James Carter Aug. 16, 2023, 5:38 p.m. UTC | #2
On Wed, Aug 9, 2023 at 10:18 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Sat, Aug 5, 2023 at 6:18 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> >     utilities.c:39:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> >     int create_test_store() {
> >                          ^
> >                           void
> >     utilities.c:171:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> >     int destroy_test_store() {
> >                           ^
> >                            void
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>

Merged.
Thanks,
Jim

> > ---
> >  libsemanage/tests/utilities.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libsemanage/tests/utilities.c b/libsemanage/tests/utilities.c
> > index 71d7af1e..806869e0 100644
> > --- a/libsemanage/tests/utilities.c
> > +++ b/libsemanage/tests/utilities.c
> > @@ -36,7 +36,7 @@ void test_msg_handler(void *varg, semanage_handle_t *handle, const char *fmt,
> >  {
> >  }
> >
> > -int create_test_store() {
> > +int create_test_store(void) {
> >         FILE *fptr;
> >
> >         if (mkdir("test-policy", 0700) < 0)
> > @@ -168,7 +168,7 @@ int write_test_policy_src(unsigned char *data, unsigned int data_len) {
> >         return 0;
> >  }
> >
> > -int destroy_test_store() {
> > +int destroy_test_store(void) {
> >         FTS *ftsp = NULL;
> >         FTSENT *curr = NULL;
> >         int ret = 0;
> > --
> > 2.40.1
> >
diff mbox series

Patch

diff --git a/libsemanage/tests/utilities.c b/libsemanage/tests/utilities.c
index 71d7af1e..806869e0 100644
--- a/libsemanage/tests/utilities.c
+++ b/libsemanage/tests/utilities.c
@@ -36,7 +36,7 @@  void test_msg_handler(void *varg, semanage_handle_t *handle, const char *fmt,
 {
 }
 
-int create_test_store() {
+int create_test_store(void) {
 	FILE *fptr;
 
 	if (mkdir("test-policy", 0700) < 0)
@@ -168,7 +168,7 @@  int write_test_policy_src(unsigned char *data, unsigned int data_len) {
 	return 0;
 }
 
-int destroy_test_store() {
+int destroy_test_store(void) {
 	FTS *ftsp = NULL;
 	FTSENT *curr = NULL;
 	int ret = 0;