help-texinfo
[Top][All Lists]
Advanced

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

Re: texinfo 7.1.1 fails to compile with gcc 14 mingw toolchain


From: Gavin Smith
Subject: Re: texinfo 7.1.1 fails to compile with gcc 14 mingw toolchain
Date: Tue, 10 Sep 2024 16:29:43 +0100

On Tue, Sep 10, 2024 at 07:00:15PM +0530, Biswapriyo Nath wrote:
> I am trying to compile texinfo 7.1.1 with gcc 14 mingw toolchain and
> got the following compiler error.
> 
> pcterm.c: In function 'pc_initialize_terminal':
> pcterm.c:1297:37: error: assignment to 'int (*)(void)' from
> incompatible pointer type 'void (*)(void)'
> [-Wincompatible-pointer-types]
>  1297 |   terminal_prep_terminal_hook       = pc_prep_terminal;
>       |                                     ^
> 
> Could anyone fix the compiler error in texinfo repository?
> 
> Thank you.

Yes, this code appears never actually to have been tested on the platform
this code was for.  Can you try the following change:

diff --git a/info/terminal.c b/info/terminal.c
index 53404346f1..69d1f0ed23 100644
--- a/info/terminal.c
+++ b/info/terminal.c
@@ -56,7 +56,7 @@ extern int tputs ();
 
 void (*terminal_initialize_terminal_hook) (char *terminal_name) = NULL;
 void (*terminal_get_screen_size_hook) (void) = NULL;
-int (*terminal_prep_terminal_hook) (void) = NULL;
+void (*terminal_prep_terminal_hook) (void) = NULL;
 void (*terminal_unprep_terminal_hook) (void) = NULL;
 void (*terminal_new_terminal_hook) (char *terminal_name) = NULL;
 void (*terminal_goto_xy_hook) (int x, int y) = NULL;
diff --git a/info/terminal.h b/info/terminal.h
index 34392500b7..28a6d07aef 100644
--- a/info/terminal.h
+++ b/info/terminal.h
@@ -59,7 +59,7 @@ extern void (*terminal_get_screen_size_hook) (void);
 extern int terminal_prep_terminal (void);
 extern void terminal_unprep_terminal (void);
 
-extern int (*terminal_prep_terminal_hook) (void);
+extern void (*terminal_prep_terminal_hook) (void);
 extern void (*terminal_unprep_terminal_hook) (void);
 
 /* Re-initialize the terminal to TERMINAL_NAME. */






reply via email to

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