This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/55896] Annoying compiler warning
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Mar 2014 13:56:57 +0000
- Subject: [Bug c/55896] Annoying compiler warning
- Auto-submitted: auto-generated
- References: <bug-55896-4 at http dot gcc dot gnu dot org/bugzilla/>
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.