fdisk, sfdisk: avoid non-ANSI function declarations [smatch scan]
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>
This commit is contained in:
parent
f5a2b07e8c
commit
57ebfde291
|
@ -23,6 +23,7 @@
|
|||
#include <limits.h>
|
||||
#include <libsmartcols.h>
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
# define _FUNCTION_DEF
|
||||
# include <readline/readline.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <libsmartcols.h>
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
# define _FUNCTION_DEF
|
||||
# include <readline/readline.h>
|
||||
#endif
|
||||
#include <libgen.h>
|
||||
|
|
Loading…
Reference in New Issue