http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55896
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > you could just use w_strlen (contents_1 + 1) and the warning could go away. This causes that two warnings are emitted :(. If strlen can't be used (ugh), then e.g. if (w_strlen(content_1) != 0) before strncat makes the warning go away.