Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1888655rwo; Thu, 3 Aug 2023 01:02:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEyh25fYyZrLoFmJ04i0IBfN2NcCXZMFOcDzFQTfd8UPoEzwCqQWAz+SWu4tfR4Dmdws/Jl X-Received: by 2002:a17:906:8a52:b0:99b:f4fa:805f with SMTP id gx18-20020a1709068a5200b0099bf4fa805fmr6480799ejc.28.1691049720919; Thu, 03 Aug 2023 01:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691049720; cv=none; d=google.com; s=arc-20160816; b=xvwHFX9rnhiQEqp4LM2BscpJdsxc9f1QXd/RT7oYjzL3XervBE2VrOZsZ15NU8nuyJ ulK+4p+ISXLbyAonWwKbe8TAySHFwBfASDcPU10UGoOOwDDSDHZXGEsoUfPnqxKKAfBR vAmKdcv+dg/eKuP0AyZuqnD4Lggvj8LRIJ6xOwhXY+ZZRu3Eqnunc5ga36vapNhwFpoE KTXEJy3yRAvefDAmDKxGru4uozk94b+6HWqLDXpVihXlZ6nBzmB824EYsmToncJSF4Sq w0kfG8EfIPY4G/ioseEuXFK6y/W04coowNWP79bAeVhpeW9Y7l4I0wL0PgUlq5ZyFZig 3p0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=1qXt3XXELAKgGGgJjA8WX7xe9zWZXQcFOskwxbPwXms=; fh=UZfhiU2pgwvZdBOe9fFEhnfTQX0/6KsvXKQubWsfhik=; b=RluGbkxcISLFapHUG4QTvrwoeoKo1+MUYv8pJF0I0rzXp+fxUaxpU5fGFnW8sIjKuP jg5fEG3a87kTlRBbbjmIpfedZaVuCgSHtHPwCzQuaucYQrkvtifq56xDrFeT1DLmG+yd c814qb/2laDPWZsgiuznIMZuSWaWoE9B+9knQT+Q/F4R5DNWQuMxl66vsoz/3VkEu6pP 7S5c+fNKENjn3XX/5tX2IkeU8kj5/nFDYZPHT6KeN8mSLuxfV1JjhA8V2tG7IYfbNOrc eUFdyFxr3oi4tXejImnTc0N1kxn3mBMjR6vkPqW30aFWn0tteRyRIfq0/seFni8GARve vLCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=LXyQLw5N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mf12-20020a170906cb8c00b0099c49a11e78si2157419ejb.975.2023.08.03.01.01.05; Thu, 03 Aug 2023 01:02:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=LXyQLw5N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234002AbjHCH3w (ORCPT + 99 others); Thu, 3 Aug 2023 03:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232169AbjHCH2y (ORCPT ); Thu, 3 Aug 2023 03:28:54 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B74CC30DA; Thu, 3 Aug 2023 00:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1691047729; bh=Bsog0Mf6TrXFPK5NCHSwt3Qj4UKD19LdkghQ5BZEmxg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LXyQLw5NM/Oe9Xu12DPpC769c6UF3r50FEMf0cdoLRblw0DhqzHGWRuHqi3XK50w+ 2EmfvwP97/YzHoyvAFDei/E+3a9ApLZFVH3gAySn//QBID7aVm/psgrO3qUXZAbwLj +M7+XGO9B+GjsjPLXmAUgDGYzxpioi81vJXcPDu8= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 03 Aug 2023 09:28:52 +0200 Subject: [PATCH v3 08/14] selftests/nolibc: make functions static if possible MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230803-nolibc-warnings-v3-8-bcc1a096ae02@weissschuh.net> References: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> In-Reply-To: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan , Zhangjin Wu , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691047727; l=1835; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=Bsog0Mf6TrXFPK5NCHSwt3Qj4UKD19LdkghQ5BZEmxg=; b=6bN7cO3nPs3BnEWlMB22XPWZvlNXbV6YYCr1ADIkFpYMKeskTrlYAiPgsG0Hvx83/fMhS4PFA 8/f1DrEBKcmDIFpU5gdml9rFlW+ibQ4LzIZOimZdANh+Mu98XuXkHSq X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows the compiler to generate warnings if they go unused. Functions that are supposed to be used as breakpoints should not be static, so un-statify those if necessary. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 154ec4787e8d..ea420c794536 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -80,7 +80,7 @@ char *itoa(int i) /* returns the error name (e.g. "ENOENT") for common errors, "SUCCESS" for 0, * or the decimal value for less common ones. */ -const char *errorname(int err) +static const char *errorname(int err) { switch (err) { case 0: return "SUCCESS"; @@ -659,7 +659,7 @@ int test_getdents64(const char *dir) return ret; } -static int test_getpagesize(void) +int test_getpagesize(void) { int x = getpagesize(); int c; @@ -688,7 +688,7 @@ static int test_getpagesize(void) return !c; } -static int test_fork(void) +int test_fork(void) { int status; pid_t pid; @@ -713,7 +713,7 @@ static int test_fork(void) } } -static int test_stat_timestamps(void) +int test_stat_timestamps(void) { struct stat st; @@ -793,7 +793,7 @@ int test_mmap_munmap(void) return !!ret; } -static int test_pipe(void) +int test_pipe(void) { const char *const msg = "hello, nolibc"; int pipefd[2]; @@ -1231,7 +1231,7 @@ static const struct test test_names[] = { { 0 } }; -int is_setting_valid(char *test) +static int is_setting_valid(char *test) { int idx, len, test_len, valid = 0; char delimiter; -- 2.41.0