svn commit: r505788 - head/devel/ddd/files
Adriaan de Groot
adridg at FreeBSD.org
Wed Jul 3 20:14:08 UTC 2019
Author: adridg
Date: Wed Jul 3 20:14:07 2019
New Revision: 505788
URL: https://svnweb.freebsd.org/changeset/ports/505788
Log:
Fix devel/ddd after fallout from libXt update.
Stricter type rules mean that you can't pass a non-noreturn function
as a parameter to a function expecting a noreturn-function. Error
reported by Antoine was
exit.C:815:12: error: no matching function for call to 'XtAppSetErrorHandler'
(void) XtAppSetErrorHandler(app_context, ddd_xt_error);
because ddd_xt_error had the wrong attribute (non-noreturn). So add
that in, and add it to goto_main_loop() as well, where it makes sense
because that uses longjmp() and doesn't return.
Reported by: antoine
Reviewed by: zeising
Added:
head/devel/ddd/files/patch-ddd_exit.C (contents, props changed)
head/devel/ddd/files/patch-ddd_mainloop.C (contents, props changed)
Added: head/devel/ddd/files/patch-ddd_exit.C
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ddd/files/patch-ddd_exit.C Wed Jul 3 20:14:07 2019 (r505788)
@@ -0,0 +1,15 @@
+It's not really NORETURN, since it jumps around (via longjmp())
+back to the main loop, but at that point we've pretty much reached
+UB anyway.
+
+--- ddd/exit.C.orig 2019-07-03 20:06:15 UTC
++++ ddd/exit.C
+@@ -769,7 +769,7 @@ static void PostXtErrorCB(XtPointer client_data, XtInt
+
+ static XtAppContext xt_error_app_context = 0;
+
+-static void ddd_xt_error(String message = 0)
++static _X_NORETURN void ddd_xt_error(String message = 0)
+ {
+ ddd_has_crashed = true;
+
Added: head/devel/ddd/files/patch-ddd_mainloop.C
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/ddd/files/patch-ddd_mainloop.C Wed Jul 3 20:14:07 2019 (r505788)
@@ -0,0 +1,11 @@
+--- ddd/mainloop.C.orig 2019-07-03 20:06:57 UTC
++++ ddd/mainloop.C
+@@ -121,7 +121,7 @@ void ddd_main_loop()
+ }
+
+ // Return to DDD main loop, using longjmp()
+-void goto_main_loop(int sig)
++_X_NORETURN void goto_main_loop(int sig)
+ {
+ longjmp(main_loop_env, sig);
+ }
More information about the svn-ports-all
mailing list