From: Gaius Mulley Date: Wed, 23 Jul 2025 09:30:35 +0000 (+0100) Subject: [modula2] Add return to remove build warning X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db8b92d8d61de408e14a4aebf5a777734936699d;p=thirdparty%2Fgcc.git [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. 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