[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] [PATCH] Move init_debug() and debug_prog() prototypes to awk.
From: |
Adrian Bunk |
Subject: |
[bug-gawk] [PATCH] Move init_debug() and debug_prog() prototypes to awk.h |
Date: |
Thu, 13 Sep 2018 20:56:43 +0300 |
Michael Tautschnig noticed a mismatch in the return type
of init_debug(), thankfully harmless since the current
user does not check it.
Move the init_debug() and debug_prog() prototypes to awk.h
to enable the compiler to do signature checking.
---
awk.h | 3 +++
main.c | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/awk.h b/awk.h
index 5af489e0..46b72e14 100644
--- a/awk.h
+++ b/awk.h
@@ -1454,6 +1454,9 @@ extern NODE *do_typeof(int nargs);
extern int strncasecmpmbs(const unsigned char *,
const unsigned char *, size_t);
extern int sanitize_exit_status(int status);
+/* debug.c */
+extern void init_debug(void);
+extern int debug_prog(INSTRUCTION *pc);
/* eval.c */
extern void PUSH_CODE(INSTRUCTION *cp);
extern INSTRUCTION *POP_CODE(void);
diff --git a/main.c b/main.c
index 4e94bddd..9d2b3294 100644
--- a/main.c
+++ b/main.c
@@ -69,9 +69,6 @@ static void init_fds(void);
static void init_groupset(void);
static void save_argv(int, char **);
-extern int debug_prog(INSTRUCTION *pc); /* debug.c */
-extern int init_debug(); /* debug.c */
-
/* These nodes store all the special variables AWK uses */
NODE *ARGC_node, *ARGIND_node, *ARGV_node, *BINMODE_node, *CONVFMT_node;
NODE *ENVIRON_node, *ERRNO_node, *FIELDWIDTHS_node, *FILENAME_node;
--
2.11.0
- [bug-gawk] [PATCH] Move init_debug() and debug_prog() prototypes to awk.h,
Adrian Bunk <=