From dcba264a46f53e6f3be4d8f93fcf93d5d61668d1 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Wed, 31 May 2017 07:56:09 +0200 Subject: =?UTF-8?q?lemon:=20avoid=20redundant=20redeclaration=20of=20?= =?UTF-8?q?=E2=80=98memory=5Ferror=E2=80=99=20[-Wredundant-decls]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1fbc11dc433363b659ddba9a77e52ffd4e3968d7 Reviewed-on: https://code.wireshark.org/review/21850 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- tools/lemon/lemon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c index e1101ae6d6..02dc201367 100644 --- a/tools/lemon/lemon.c +++ b/tools/lemon/lemon.c @@ -422,8 +422,8 @@ struct lemon { }; #define MemoryCheck(X) if((X)==0){ \ - extern void memory_error(void); \ - memory_error(); \ + fprintf(stderr,"Out of memory. Aborting...\n"); \ + exit(1); \ } /**************** From the file "table.h" *********************************/ @@ -1516,10 +1516,6 @@ make_basename(char* fullname) /* Report an out-of-memory condition and abort. This function ** is used mostly by the "MemoryCheck" macro in struct.h */ -extern void memory_error(void){ - fprintf(stderr,"Out of memory. Aborting...\n"); - exit(1); -} static int nDefine = 0; /* Number of -D options on the command line */ static char **azDefine = 0; /* Name of the -D macros */ -- cgit v1.2.1