fix X11 warning with gcc-15

../win/X11/winX.c: In function ‘init_standard_windows’:
../win/X11/winX.c:2769:46: warning: passing argument 2 of ‘XtAppSetErrorHandler’ makes ‘__attribute__((noreturn))’ qualified function pointer from unqualified [-Wdiscarded-qualifiers]
 2769 |     (void) XtAppSetErrorHandler(app_context, X11_error_handler);
      |                                              ^~~~~~~~~~~~~~~~~
In file included from ../win/X11/winX.c:27:
/usr/include/X11/Intrinsic.h:1771:5: note: expected ‘__attribute__((noreturn)) void (*)(char *)’ but argument is of type ‘void (*)(char *)’
 1771 |     XtErrorHandler      /* handler */ _X_NORETURN
      |     ^
This commit is contained in:
nhmall
2025-05-30 21:17:07 -04:00
parent e365b5b18f
commit 50e5715ca5

View File

@@ -100,7 +100,7 @@ int click_x, click_y, click_button; /* Click position on a map window
int updated_inventory; /* used to indicate perm_invent updating */
color_attr X11_menu_promptstyle = { NO_COLOR, ATR_NONE };
static void X11_error_handler(String) NORETURN;
ATTRNORETURN static void X11_error_handler(String) NORETURN;
static int X11_io_error_handler(Display *);
static int (*old_error_handler)(Display *, XErrorEvent *);
@@ -175,7 +175,7 @@ static void X11_sig_cb(XtPointer, XtSignalId *);
#endif
static void d_timeout(XtPointer, XtIntervalId *);
static void X11_hangup(Widget, XEvent *, String *, Cardinal *);
static void X11_bail(const char *) NORETURN;
ATTRNORETURN static void X11_bail(const char *) NORETURN;
static void askname_delete(Widget, XEvent *, String *, Cardinal *);
static void askname_done(Widget, XtPointer, XtPointer);
static void done_button(Widget, XtPointer, XtPointer);