Skip to contentSkip to conversation

x86/boot/string: Add missing strchr declaration

PATCH New Tommy Nguyen 2 participants 2 messages Jun 23, 2017 – Jun 24, 2017 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot/string: Add missing strchr declaration

The Sparse static analyzer emits this warning:

symbol 'strchr' was not declared. Should it be static?

This patch adds the appropriate extern declaration to string.h to fix the warning.

---
 arch/x86/boot/string.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/boot/string.h +1 -0
index 113588d..fa03b8f 100644
@@ -22,6 +22,7 @@ extern int strcmp(const char *str1, const char *str2);
 extern int strncmp(const char *cs, const char *ct, size_t count);
 extern size_t strlen(const char *s);
 extern char *strstr(const char *s1, const char *s2);
+extern char *strchr(const char *s, int c);
 extern size_t strnlen(const char *s, size_t maxlen);
 extern unsigned int atou(const char *s);
 extern unsigned long long simple_strtoull(const char *cp, char **endp,
Signature · 1 line
2.9.4
#1 lore raw

[tip:x86/cleanups] x86/boot: Add missing strchr() declaration

x86/boot: Add missing strchr() declaration
Commit-ID:  6ec829a9d1c8562ac15c50402e5de550bb28161e
Gitweb:     http://git.kernel.org/tip/6ec829a9d1c8562ac15c50402e5de550bb28161e
Author:     Tommy Nguyen <[email protected]>
AuthorDate: Fri, 23 Jun 2017 10:36:01 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sat, 24 Jun 2017 08:53:33 +0200

x86/boot: Add missing strchr() declaration

The Sparse static analyzer emits this warning:

symbol 'strchr' was not declared. Should it be static?

This patch adds the appropriate extern declaration to string.h to fix the warning.

---
 arch/x86/boot/string.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/boot/string.h +1 -0
index 113588d..f274a50 100644
@@ -22,6 +22,7 @@ extern int strcmp(const char *str1, const char *str2);
 extern int strncmp(const char *cs, const char *ct, size_t count);
 extern size_t strlen(const char *s);
 extern char *strstr(const char *s1, const char *s2);
+extern char *strchr(const char *s, int c);
 extern size_t strnlen(const char *s, size_t maxlen);
 extern unsigned int atou(const char *s);
 extern unsigned long long simple_strtoull(const char *cp, char **endp,