From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753966AbdFWOgF (ORCPT ); Fri, 23 Jun 2017 10:36:05 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:34401 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752170AbdFWOgE (ORCPT ); Fri, 23 Jun 2017 10:36:04 -0400 Date: Fri, 23 Jun 2017 10:36:01 -0400 From: Tommy Nguyen To: "H. Peter Anvin" Cc: Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] x86/boot/string: Add missing strchr declaration Message-ID: <20170623143601.GA20743@NoChina> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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