bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] sh-quote: avoid a warning from -Wstrict-prototypes


From: Jim Meyering
Subject: [PATCH] sh-quote: avoid a warning from -Wstrict-prototypes
Date: Sat, 21 Nov 2009 19:50:55 +0100

Hi Bruno,

I get only one -Wstrict-prototypes violation in diffutil's lib/
directory.  This fixes it.  Ok to apply?

>From 29434090a56d569a307b918dc20aa87f7fb7525e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 21 Nov 2009 19:37:58 +0100
Subject: [PATCH] sh-quote: avoid a warning from -Wstrict-prototypes

* lib/sh-quote.c (init_sh_quoting_options): Add "void" in declaration
to avoid a warning from -Wstrict-prototypes.
---
 ChangeLog      |    4 ++++
 lib/sh-quote.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 04b2a6b..79c973d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-11-21  Jim Meyering  <address@hidden>

+       sh-quote: avoid a warning from -Wstrict-prototypes
+       * lib/sh-quote.c (init_sh_quoting_options): Add "void" in declaration
+       to avoid a warning from -Wstrict-prototypes.
+
        c-stack: avoid "ignoring return value of `write'" warning
        * lib/c-stack.c: Include "ignore-value.h".
        (die): Explicitly ignore each write return value.
diff --git a/lib/sh-quote.c b/lib/sh-quote.c
index e349f40..788989a 100644
--- a/lib/sh-quote.c
+++ b/lib/sh-quote.c
@@ -1,5 +1,5 @@
 /* Shell quoting.
-   Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2001.

    This program is free software: you can redistribute it and/or modify
@@ -30,7 +30,7 @@ static struct quoting_options *sh_quoting_options;

 /* Initializes the sh_quoting_options variable.  */
 static void
-init_sh_quoting_options ()
+init_sh_quoting_options (void)
 {
   sh_quoting_options = clone_quoting_options (NULL);
   set_quoting_style (sh_quoting_options, shell_quoting_style);
--
1.6.5.3.433.g11067




reply via email to

[Prev in Thread] Current Thread [Next in Thread]