Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1211881rwb; Sat, 5 Aug 2023 09:27:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAcMqOhYWBlZzAn8u2nGMOavCHAPaBW6sFxGNLx71X51nNfc1hDINS7upM2SeC7mC98jaW X-Received: by 2002:a17:906:d54a:b0:978:8979:c66c with SMTP id cr10-20020a170906d54a00b009788979c66cmr2816252ejc.18.1691252821961; Sat, 05 Aug 2023 09:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691252821; cv=none; d=google.com; s=arc-20160816; b=Qlm0euDVRIS7psKtBrdk1jEWxxZramQJAKc7Tj3PsAkcnq0wXfZmEd8+/QqwzQxgFB J/3QwMlPVkCieB4va/tPQRsYc0NAelerxCuCCj4/u+oLEIdB6e5pzr0UH2XNl6Hlo9FS lMTmnhIcsAYDxsdlELZfp4LN7K0UaXSC8+f/wEAYGAlz9av34P+HepXcgnVngReojjhE ddzjbhaIWXHJVuyDz/VQi57Om1d7FcZtPJBftxUe5eVX/eluyEACBaZ8F0x2L1ZQt/rh LQpBhyygMyNJBSYlvW6aBHCG1jc5etbzunuPfCO3TiKLkiuXSBknduO/XxQGAmIxcwwt PUxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XevqsMuaWEhKFEq4RzbbrHUGQaFEm4dQdr4+zYelKB4=; fh=TTF1lt49Sby0rKay1qRjEqWFbUkg3/0Ba8LROUDUaGE=; b=YdfXORhSOsUlvdBcrIFiO1ifdJZbYWBtq1Lvb9nUiKpP8AbOm3yWW5zEriGKlzA7nN HP9rmmeLMIYMO4cLfsb50HNq0KZs1nsPXvSTJxevgJt5PTBxoKddRVKnw1ede8K4shnP ngw7PqtoS2mwiMvPV1VeT0BYIvwJwb+rowtRAdx+Cpx215BDA6vhaT3mCg/vl6CpWWf8 a49ANyMbgSqnEJjZ3NPw9xtVAcfi9CMy/OIbdR/Qr7+YSYZiWnqLme6oHfs0szUQbdtZ AaDUJpLSTn5Hd/wtzTMBXVi7mF2SaF2q8inIRzTFkHmhjpCXe6b2Ajjq1Bulm8O84V8Q 9w9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 kj6-20020a170907764600b00992f45c9342si2786261ejc.1020.2023.08.05.09.26.38; Sat, 05 Aug 2023 09:27:01 -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; 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 S229841AbjHEQXw (ORCPT + 99 others); Sat, 5 Aug 2023 12:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjHEQXv (ORCPT ); Sat, 5 Aug 2023 12:23:51 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7671A4206; Sat, 5 Aug 2023 09:23:44 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 375GNRag023372; Sat, 5 Aug 2023 18:23:27 +0200 Date: Sat, 5 Aug 2023 18:23:27 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Tan , Zhangjin Wu Subject: Re: [PATCH v3 14/14] selftests/nolibc: enable compiler warnings Message-ID: <20230805162327.GB15284@1wt.eu> References: <20230803-nolibc-warnings-v3-0-bcc1a096ae02@weissschuh.net> <20230803-nolibc-warnings-v3-14-bcc1a096ae02@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230803-nolibc-warnings-v3-14-bcc1a096ae02@weissschuh.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS 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 On Thu, Aug 03, 2023 at 09:28:58AM +0200, Thomas Wei?schuh wrote: > It will help the developers to avoid cruft and detect some bugs. > > Signed-off-by: Thomas Wei?schuh > --- > tools/testing/selftests/nolibc/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > index b82d29b6c37f..e8d09cbee2ab 100644 > --- a/tools/testing/selftests/nolibc/Makefile > +++ b/tools/testing/selftests/nolibc/Makefile > @@ -79,7 +79,7 @@ endif > CFLAGS_s390 = -m64 > CFLAGS_mips = -EL > CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all)) > -CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \ > +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra \ > $(call cc-option,-fno-stack-protector) \ > $(CFLAGS_$(ARCH)) $(CFLAGS_STACKPROTECTOR) > LDFLAGS := I'm now getting this with gcc < 9: nolibc-test.c: In function 'test_pipe': nolibc-test.c:811:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (len != strlen(msg)) ^ The reason is that len is ssize_t and strlen() is size_t. I tried different approaches here but the cleanest remains turning len to size_t (we don't use its sign anyway), so I'll do that one as well. Cheers, Willy