From patchwork Tue Jul 19 21:44:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Willy Tarreau X-Patchwork-Id: 592030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5597DC433EF for ; Tue, 19 Jul 2022 21:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240320AbiGSVpj (ORCPT ); Tue, 19 Jul 2022 17:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240225AbiGSVp0 (ORCPT ); Tue, 19 Jul 2022 17:45:26 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C0B3F58B; Tue, 19 Jul 2022 14:45:25 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 26JLj4NQ002582; Tue, 19 Jul 2022 23:45:04 +0200 From: Willy Tarreau To: "Paul E . McKenney" Cc: Pranith Kumar , Alviro Iskandar Setiawan , Ammar Faizi , David Laight , Mark Brown , Linus Torvalds , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Willy Tarreau Subject: [PATCH 02/17] tools/nolibc: fix build warning in sys_mmap() when my_syscall6 is not defined Date: Tue, 19 Jul 2022 23:44:33 +0200 Message-Id: <20220719214449.2520-3-w@1wt.eu> X-Mailer: git-send-email 2.17.5 In-Reply-To: <20220719214449.2520-1-w@1wt.eu> References: <20220719214449.2520-1-w@1wt.eu> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org We return -ENOSYS when there's no syscall6() operation, but we must cast it to void* to avoid a warning. Signed-off-by: Willy Tarreau --- tools/include/nolibc/sys.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 08491070387b..b8c96878c9ce 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -692,7 +692,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd, { #ifndef my_syscall6 /* Function not implemented. */ - return -ENOSYS; + return (void *)-ENOSYS; #else int n;