Re: [PATCH] Remove 'strchr' warning from reiserfs

From: Stephen Hemminger (shemminger@osdl.org)
Date: Mon May 19 2003 - 14:47:12 EST


On Sat, 17 May 2003 21:16:11 +0200
Sam Ravnborg <sam@ravnborg.org> wrote:

> Hi Linus, please apply - maintainer cc:ed for info.
>
> Reiserfs emits a warning about strchr being defined but not
> used. I finally tracked down the reason for this.
> gcc - when seeing strstr(x, "%") recognized that the second parameter
> is a char, and therefore uses strchr instead of strstr.
> The workaround to avoid the warning is to replace the call
> to strstr with strchr - which is OK.
>
> This hides the warning, and brings us down to 6 warnings for a
> make defconfig bzImage.
>
> Sam

Good job finding this, several others have looked and never found what
was causing it. Is this gcc behaviour documented anywhere? What other
surprises are there?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:35 EST