From e86c78744bbf3b86182f9a6764993756e0160c45 Mon Sep 17 00:00:00 2001 From: step- Date: Fri, 19 Apr 2024 14:35:13 +0200 Subject: [PATCH 1/3] fix implicit declaration warning/error (gcc14) for #160 --- src/actions.c | 2 ++ src/automaton.c | 3 +++ src/glade_support.c | 1 + src/gtkdialog.c | 1 + src/gtkdialog_lexer.l | 2 ++ src/gtkdialog_parser.y | 4 ++++ src/stringman.c | 1 + src/variables.c | 2 ++ src/widget_notebook.c | 1 + src/widget_timer.c | 1 + 10 files changed, 18 insertions(+) diff --git a/src/actions.c b/src/actions.c index b088202..6d9b27a 100644 --- a/src/actions.c +++ b/src/actions.c @@ -38,6 +38,8 @@ #include "tag_attributes.h" #include "config.h" +int gtkdialog_parse(void); + extern gchar *option_include_file; /* Local function prototypes */ diff --git a/src/automaton.c b/src/automaton.c index 857e6e8..6664ca7 100644 --- a/src/automaton.c +++ b/src/automaton.c @@ -87,6 +87,9 @@ #undef TOOLTIPS +int instruction_execute(instruction); +void push_widget(GtkWidget *, int); + extern gboolean option_no_warning; instruction *program = NULL; diff --git a/src/glade_support.c b/src/glade_support.c index 155f5d2..0f3906e 100644 --- a/src/glade_support.c +++ b/src/glade_support.c @@ -44,6 +44,7 @@ typedef struct _gtkdialog_signal { /* function prototypes */ gint widget_get_type_from_pointer(GtkWidget *widget); +int execute_action(GtkWidget *widget, const char *command, const char *type); /* ** Signal handler callbascks. diff --git a/src/gtkdialog.c b/src/gtkdialog.c index 1368cd9..7b820e3 100644 --- a/src/gtkdialog.c +++ b/src/gtkdialog.c @@ -627,6 +627,7 @@ main(int argc, char *argv[]) gtk_init(&argc, &argv); #if HAVE_GLADE_LIB + void run_program_by_glade(const gchar *filename, const gchar *window_name); if (option_glade_file != NULL) { run_program_by_glade(option_glade_file, option_input_variable); exit(EXIT_SUCCESS); diff --git a/src/gtkdialog_lexer.l b/src/gtkdialog_lexer.l index abb6d9b..e22f2c8 100644 --- a/src/gtkdialog_lexer.l +++ b/src/gtkdialog_lexer.l @@ -44,6 +44,8 @@ #include "gtkdialog_parser.h" static gchar *process_string(gchar *str); +int getnextchar(void); +int gtkdialog_error(char *); extern int linenumber; gchar *Token; diff --git a/src/gtkdialog_parser.y b/src/gtkdialog_parser.y index 25d7105..7f8e1cd 100644 --- a/src/gtkdialog_parser.y +++ b/src/gtkdialog_parser.y @@ -60,6 +60,10 @@ extern gboolean option_print_ir; // int yywarning(char *c); void yyerror_simple(char *c); +void run_program(void); +void print_program(void); +int gtkdialog_lex(void); +int gtkdialog_error(char *); static inline void start_up(void) diff --git a/src/stringman.c b/src/stringman.c index 08eae7d..1618469 100644 --- a/src/stringman.c +++ b/src/stringman.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "gtkdialog.h" diff --git a/src/variables.c b/src/variables.c index 3a5933e..8a905c6 100644 --- a/src/variables.c +++ b/src/variables.c @@ -61,6 +61,8 @@ extern gboolean option_no_warning; +int yywarning (char *); + /* Local function prototypes */ #ifdef DEBUG void variables_print_one(variable *var); diff --git a/src/widget_notebook.c b/src/widget_notebook.c index 507f309..c25d051 100644 --- a/src/widget_notebook.c +++ b/src/widget_notebook.c @@ -28,6 +28,7 @@ #include "automaton.h" #include "widgets.h" #include "tag_attributes.h" +#include "signals.h" /* Defines */ //#define DEBUG_CONTENT diff --git a/src/widget_timer.c b/src/widget_timer.c index 834455f..4a7e7be 100644 --- a/src/widget_timer.c +++ b/src/widget_timer.c @@ -28,6 +28,7 @@ #include "automaton.h" #include "widgets.h" #include "tag_attributes.h" +#include "signals.h" /* Defines */ //#define DEBUG_CONTENT From 8a3e9114e54791b5f0286e6ecb553c9d4cafde6a Mon Sep 17 00:00:00 2001 From: step- Date: Fri, 19 Apr 2024 14:39:42 +0200 Subject: [PATCH 2/3] fix implicit declaration of g_printf warning it's inconsistent with other functions in this file for #160 --- src/automaton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/automaton.c b/src/automaton.c index 6664ca7..dd3edd5 100644 --- a/src/automaton.c +++ b/src/automaton.c @@ -335,7 +335,7 @@ print_program() for (pc = 0; pc < instruction_counter; ++pc) { command = program[pc]; - g_printf("%5d ", pc); + printf("%5d ", pc); print_command(command); } } From 76706555ad3f00cfd77a23300ea7c005a21ac2f6 Mon Sep 17 00:00:00 2001 From: step- Date: Fri, 19 Apr 2024 14:40:36 +0200 Subject: [PATCH 3/3] fix return with no value error (gcc14) for #160 --- src/variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variables.c b/src/variables.c index 8a905c6..b3daaf0 100644 --- a/src/variables.c +++ b/src/variables.c @@ -1121,7 +1121,7 @@ static gint do_variables_count_widgets(variable *actual, gint n) actual = root; if (actual == NULL) - return; + return n; if (actual->left != NULL) n = do_variables_count_widgets(actual->left, n);