From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH] fdisk, sfdisk: avoid non-ANSI function declarations [smatch scan]
Date: Mon, 20 Feb 2017 22:12:42 +0000 [thread overview]
Message-ID: <20170220221242.24130-1-kerolasa@iki.fi> (raw)
Adding _FUNCTION_DEF definition will exclude compatibility type definitions
that do include void key word in empty argument list.
/usr/include/readline/rltypedefs.h:35:23: warning: non-ANSI function
declaration of function 'Function'
These functions has been replaced by set of new ones in readline 4.2 (April
2001), and removed in 6.3 (February 2014).
Reference: https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES
Rererence: https://blueslugs.com/blog/2016-10-23-updating-cppfunction-in-old-readline-consumers/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
disk-utils/fdisk.c | 1 +
disk-utils/sfdisk.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c
index 4ac58ee4d..f1cd3aa5a 100644
--- a/disk-utils/fdisk.c
+++ b/disk-utils/fdisk.c
@@ -23,6 +23,7 @@
#include <limits.h>
#include <libsmartcols.h>
#ifdef HAVE_LIBREADLINE
+# define _FUNCTION_DEF
# include <readline/readline.h>
#endif
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index f4f9b6b1a..b492b0cb5 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <libsmartcols.h>
#ifdef HAVE_LIBREADLINE
+# define _FUNCTION_DEF
# include <readline/readline.h>
#endif
#include <libgen.h>
--
2.11.1
next reply other threads:[~2017-02-20 22:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 22:12 Sami Kerola [this message]
2017-03-14 13:03 ` [PATCH] fdisk, sfdisk: avoid non-ANSI function declarations [smatch scan] Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170220221242.24130-1-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox