Re: [hatari-devel] Compiler warnings changes |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi, On 6.11.2023 21.22, Thomas Huth wrote:
Am Mon, 6 Nov 2023 20:40:00 +0200 schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:Are you not seeing it?No, I don't get those, and the CI is green, too: https://cirrus-ci.com/build/4983829757165568 https://gitlab.com/huth/hatari/-/pipelines/1062850068 (and at least the gitlab jobs are using -Werror) Which compiler version / distro are you using?
GCC 12.2 on Debian stable.
I'm not sure how important it's to avoid it though, as this is not a real problem: ----------------------------------------------- - strncpy(fentries[i]->d_name, files->names[i], sizeof(fentries[i]->d_name)); + strncpy(fentries[i]->d_name, files->names[i], sizeof(fentries[i]->d_name)-1); fentries[i]->d_name[sizeof(fentries[i]->d_name) - 1] = 0; -----------------------------------------------That looks like a sane fix to silence the warning, feel free to commit it!
Pushed. - Eero
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |