Commit 3584199a authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Linus Torvalds

[PATCH] Remove 'strchr' warning from reiserfs

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.
parent 1fafca14
...@@ -164,7 +164,7 @@ static char * is_there_reiserfs_struct (char * fmt, int * what, int * skip) ...@@ -164,7 +164,7 @@ static char * is_there_reiserfs_struct (char * fmt, int * what, int * skip)
*skip = 0; *skip = 0;
while ((k = strstr (k, "%")) != NULL) while ((k = strchr (k, '%')) != NULL)
{ {
if (k[1] == 'k' || k[1] == 'K' || k[1] == 'h' || k[1] == 't' || if (k[1] == 'k' || k[1] == 'K' || k[1] == 'h' || k[1] == 't' ||
k[1] == 'z' || k[1] == 'b' || k[1] == 'y' || k[1] == 'a' ) { k[1] == 'z' || k[1] == 'b' || k[1] == 'y' || k[1] == 'a' ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment