Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1673605 > unrolled thread

[PATCH] x86/boot/string: Add missing strchr declaration

Started byTommy Nguyen <remyabel@gmail.com>
First post2017-06-23 16:40 +0200
Last post2017-06-24 09:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] x86/boot/string: Add missing strchr declaration Tommy Nguyen <remyabel@gmail.com> - 2017-06-23 16:40 +0200
    [tip:x86/cleanups] x86/boot: Add missing strchr() declaration tip-bot for Tommy Nguyen <tipbot@zytor.com> - 2017-06-24 09:30 +0200

#1673605 — [PATCH] x86/boot/string: Add missing strchr declaration

FromTommy Nguyen <remyabel@gmail.com>
Date2017-06-23 16:40 +0200
Subject[PATCH] x86/boot/string: Add missing strchr declaration
Message-ID<tVxUC-3mk-1@gated-at.bofh.it>
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.

Signed-off-by: Tommy Nguyen <remyabel@gmail.com>
---
 arch/x86/boot/string.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/string.h b/arch/x86/boot/string.h
index 113588d..fa03b8f 100644
--- a/arch/x86/boot/string.h
+++ b/arch/x86/boot/string.h
@@ -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,
-- 
2.9.4

[toc] | [next] | [standalone]


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

Fromtip-bot for Tommy Nguyen <tipbot@zytor.com>
Date2017-06-24 09:30 +0200
Subject[tip:x86/cleanups] x86/boot: Add missing strchr() declaration
Message-ID<tVNG2-4Tg-13@gated-at.bofh.it>
In reply to#1673605
Commit-ID:  6ec829a9d1c8562ac15c50402e5de550bb28161e
Gitweb:     http://git.kernel.org/tip/6ec829a9d1c8562ac15c50402e5de550bb28161e
Author:     Tommy Nguyen <remyabel@gmail.com>
AuthorDate: Fri, 23 Jun 2017 10:36:01 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: Tommy Nguyen <remyabel@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170623143601.GA20743@NoChina
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/boot/string.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/string.h b/arch/x86/boot/string.h
index 113588d..f274a50 100644
--- a/arch/x86/boot/string.h
+++ b/arch/x86/boot/string.h
@@ -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,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web