https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66422
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this is a false warning as you are saying the size is at least 4 which means if buf[ does not contain 1, you will access past the loop bounds.