https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125087
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <[email protected]>: https://gcc.gnu.org/g:05c76637481870f2c3b3c970f0a16adad1652143 commit r17-414-g05c76637481870f2c3b3c970f0a16adad1652143 Author: Harald Anlauf <[email protected]> Date: Fri May 8 21:45:31 2026 +0200 libfortran: fix static analyser cppcheck warning in free_format_data [PR125087] The static analyser cppcheck reported a pointless assignment in function free_format_data. The intent of the assignment was to finally nullify the pointer to allocated format data after memory has been freed. Since C does not support references, add a level of indirection to the function argument so that the dereferenced argument can be nullified. PR libfortran/125087 libgfortran/ChangeLog: * io/format.c (free_format_data): Change argument from pointer to format_data to pointer to pointer of object. (free_format_hash_table): Adjust argument passed to free_format_data. (save_parsed_format): Likewise. * io/format.h (free_format_data): Adjust prototype. * io/transfer.c (st_read_done_worker): Adjust argument passed to free_format_data. (st_write_done_worker): Likewise.
