git: 72d0d9b5dad6 - main - x11-toolkits/open-motif*: fix build with clang 16

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 15 May 2023 14:36:54 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=72d0d9b5dad67545e571057abd8d59166ce247b2

commit 72d0d9b5dad67545e571057abd8d59166ce247b2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-05-15 14:17:12 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2023-05-15 14:36:17 +0000

    x11-toolkits/open-motif*: fix build with clang 16
    
    Clang 16 has a new error about incompatible function types, which shows
    up when building x11-toolkits/open-motif:
    
      WmError.c:134:24: error: incompatible function pointer types passing 'void (char *)' to parameter of type 'void (*)(String) __attribute__((noreturn))' (aka 'void (*)(char *) __attribute__((noreturn))') [-Wincompatible-function-pointer-types]
          XtSetErrorHandler (WmXtErrorHandler);
                             ^~~~~~~~~~~~~~~~
      /usr/local/include/X11/Intrinsic.h:1776:1: note: passing argument to parameter here
      );
      ^
    
    In this case the declaration of the callback function for
    XtSetErrorHandler() shoud have a noreturn attribute, specifically using
    the _X_NORETURN macro.
    
    PR:             271425
---
 .../open-motif-devel/files/patch-clients_mwm_WmError.h        | 11 +++++++++++
 x11-toolkits/open-motif/files/patch-clients_mwm_WmError.h     | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/x11-toolkits/open-motif-devel/files/patch-clients_mwm_WmError.h b/x11-toolkits/open-motif-devel/files/patch-clients_mwm_WmError.h
new file mode 100644
index 000000000000..c25975f099a8
--- /dev/null
+++ b/x11-toolkits/open-motif-devel/files/patch-clients_mwm_WmError.h
@@ -0,0 +1,11 @@
+--- clients/mwm/WmError.h.orig	2017-08-17 00:38:43 UTC
++++ clients/mwm/WmError.h
+@@ -32,7 +32,7 @@ extern int WmXIOErrorHandler (Display *display);
+ extern void WmInitErrorHandler (Display *display);
+ extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
+ extern int WmXIOErrorHandler (Display *display);
+-extern void WmXtErrorHandler (char *message);
++extern void WmXtErrorHandler (char *message) _X_NORETURN;
+ extern void WmXtWarningHandler (char *message);
+ extern void Warning (char *message);
+ #ifndef NO_MESSAGE_CATALOG
diff --git a/x11-toolkits/open-motif/files/patch-clients_mwm_WmError.h b/x11-toolkits/open-motif/files/patch-clients_mwm_WmError.h
new file mode 100644
index 000000000000..c25975f099a8
--- /dev/null
+++ b/x11-toolkits/open-motif/files/patch-clients_mwm_WmError.h
@@ -0,0 +1,11 @@
+--- clients/mwm/WmError.h.orig	2017-08-17 00:38:43 UTC
++++ clients/mwm/WmError.h
+@@ -32,7 +32,7 @@ extern int WmXIOErrorHandler (Display *display);
+ extern void WmInitErrorHandler (Display *display);
+ extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
+ extern int WmXIOErrorHandler (Display *display);
+-extern void WmXtErrorHandler (char *message);
++extern void WmXtErrorHandler (char *message) _X_NORETURN;
+ extern void WmXtWarningHandler (char *message);
+ extern void Warning (char *message);
+ #ifndef NO_MESSAGE_CATALOG