https://gcc.gnu.org/g:8701cdbf8df3f746df85882878beb8e8f897b014
commit r14-10967-g8701cdbf8df3f746df85882878beb8e8f897b014 Author: Gaius Mulley <gaiusm...@gmail.com> Date: Fri Nov 22 19:46:44 2024 +0000 [PATCH] PR modula2/115540 gcc/m2/mc-boot-ch/Gtermios.cc error return-statement with a value This patch fixes three occurrences of cfmakeraw use in the hand built m2 support libraries which incorrectly attempt to return a void result. gcc/m2/ChangeLog: PR modula2/115540 * gm2-libs-ch/termios.c (cfmakeraw): Remove return. * mc-boot-ch/Gtermios.cc (cfmakeraw): Remove return. * pge-boot/Gtermios.cc (cfmakeraw): Remove return. (cherry picked from commit d16355c72c7f7b54ecf06371d14d7ad309ea4c34) Signed-off-by: Gaius Mulley <gaiusm...@gmail.com> Diff: --- gcc/m2/gm2-libs-ch/termios.c | 2 +- gcc/m2/mc-boot-ch/Gtermios.cc | 2 +- gcc/m2/pge-boot/Gtermios.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/m2/gm2-libs-ch/termios.c b/gcc/m2/gm2-libs-ch/termios.c index 472a4c022e80..fe7403b3dee3 100644 --- a/gcc/m2/gm2-libs-ch/termios.c +++ b/gcc/m2/gm2-libs-ch/termios.c @@ -281,7 +281,7 @@ int EXPORT (tcsetattr) (int fd, int option, struct termios *t) void EXPORT (cfmakeraw) (struct termios *t) { #if defined(HAVE_CFMAKERAW) - return cfmakeraw (t); + cfmakeraw (t); #endif } diff --git a/gcc/m2/mc-boot-ch/Gtermios.cc b/gcc/m2/mc-boot-ch/Gtermios.cc index a11065a67257..0ef5c8ba8039 100644 --- a/gcc/m2/mc-boot-ch/Gtermios.cc +++ b/gcc/m2/mc-boot-ch/Gtermios.cc @@ -289,7 +289,7 @@ void EXPORT (cfmakeraw) (struct termios *t) { #if defined(HAVE_CFMAKERAW) - return cfmakeraw (t); + cfmakeraw (t); #endif } diff --git a/gcc/m2/pge-boot/Gtermios.cc b/gcc/m2/pge-boot/Gtermios.cc index 4f3557619db1..5f966403b197 100644 --- a/gcc/m2/pge-boot/Gtermios.cc +++ b/gcc/m2/pge-boot/Gtermios.cc @@ -289,7 +289,7 @@ void EXPORT (cfmakeraw) (struct termios *t) { #if defined(HAVE_CFMAKERAW) - return cfmakeraw (t); + cfmakeraw (t); #endif }