Commit 831ade0b2b for perl
commit 831ade0b2b3ec789974c3e5f295f01d18b85d784
Author: Tigranuhy Grigoryan <tigranuhy.grigoryan@gmail.com>
Date: Wed Sep 30 17:46:43 2026 +0400
POSIX.xs: Initialise RETVAL in Termios::new when I_TERMIOS is undefined
25f40b3 changed POSIX::Termios::new from a void XSUB writing ST(0) to an
SV* XSUB with OUTPUT: RETVAL. Where I_TERMIOS is not defined the #else
branch calls not_here() and RETVAL is never assigned, but xsubpp still
emits RETVAL = sv_2mortal(RETVAL). not_here() is not declared noreturn,
so the compiler cannot prove the statement unreachable.
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 33381c2392..e47a1ffe13 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1840,6 +1840,7 @@ new(packname = "POSIX::Termios", ...)
*/
memset(p, 0, 1 + sizeof(struct termios));
#else
+ RETVAL = NULL;
not_here("termios");
#endif
}