https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124183
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Adding:
if (!cstr) {
return 1;
}
After the malloc does fix the warning.
pinskia at gcc dot gnu.org via Gcc-bugs Fri, 20 Feb 2026 07:40:24 -0800
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124183
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Adding:
if (!cstr) {
return 1;
}
After the malloc does fix the warning.