From: Gaius Mulley Date: Sat, 26 Jul 2025 13:08:21 +0000 (+0100) Subject: [PATCH] [modula2] Add return to remove build warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba8769cdf1cd8bf451a954ab5c4dfde2fafee00;p=thirdparty%2Fgcc.git [PATCH] [modula2] Add return to remove build warning This patch adds a return statement to M2Exception which removes a build warning. gcc/m2/ChangeLog: * gm2-libs/M2EXCEPTION.mod (M2Exception): Add return exException in case Raise completes. (cherry picked from commit db8b92d8d61de408e14a4aebf5a777734936699d) Signed-off-by: Gaius Mulley --- diff --git a/gcc/m2/gm2-libs/M2EXCEPTION.mod b/gcc/m2/gm2-libs/M2EXCEPTION.mod index a17310f5fe3..e92b16d406a 100644 --- a/gcc/m2/gm2-libs/M2EXCEPTION.mod +++ b/gcc/m2/gm2-libs/M2EXCEPTION.mod @@ -33,7 +33,7 @@ FROM RTExceptions IMPORT EHBlock, GetExceptionBlock, GetNumber, Raise, (* If the program or coroutine is in the exception state then return the enumeration value representing the exception cause. If it is not in the exception state then - raises and exception (exException). *) + raises an exException exception. *) PROCEDURE M2Exception () : M2Exceptions; VAR @@ -45,7 +45,8 @@ BEGIN IF n = MAX (CARDINAL) THEN Raise (ORD (exException), ADR (__FILE__), __LINE__, __COLUMN__, ADR (__FUNCTION__), - ADR ('current coroutine is not in the exceptional execution state')) + ADR ('current coroutine is not in the exceptional execution state')) ; + RETURN exException ELSE RETURN VAL (M2Exceptions, n) END