bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] "this function declaration is not a prototype" warning wi


From: Roman Bogorodskiy
Subject: [Bug-readline] "this function declaration is not a prototype" warning with clang 4
Date: Fri, 26 May 2017 21:18:04 +0400
User-agent: Mutt/1.8.2 (2017-04-18)

Hi,

I have readline 6.3.8 installed on FreeBSD. When I build software that
uses it (libvirt in my case) with clang 4.0.0, I have the following
errors:

gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools'
  CC       virsh-virsh.o
In file included from virsh.c:45:
In file included from /usr/local/include/readline/readline.h:31:
/usr/local/include/readline/rltypedefs.h:35:22: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef int Function () __attribute__ ((deprecated));
                     ^
                      void
/usr/local/include/readline/rltypedefs.h:36:24: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef void VFunction () __attribute__ ((deprecated));
                       ^
                        void
/usr/local/include/readline/rltypedefs.h:37:26: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char *CPFunction () __attribute__ ((deprecated));
                         ^
                          void
/usr/local/include/readline/rltypedefs.h:38:28: error: this function 
declaration is not a prototype [-Werror,-Wstrict-prototypes]
typedef char **CPPFunction () __attribute__ ((deprecated));
                           ^
                            void
In file included from virsh.c:45:
/usr/local/include/readline/readline.h:385:23: error: this function declaration 
is not a prototype [-Werror,-Wstrict-prototypes]
extern int rl_message ();
                      ^
                       void
5 errors generated.
gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1

In combination with -Werror it causes build failure. I've checked the
'devel' branch of readline and rltypedefs.h looks the same (at least
relevant parts of it).

This works for me if I change it too:

typedef int Function (void) __attribute__ ((deprecated));

and other typedefs in a similar way.

Roman Bogorodskiy

Attachment: signature.asc
Description: PGP signature


reply via email to

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