Message ID | 20230121175330.438515-1-hauke@hauke-m.de |
---|---|
State | Accepted |
Delegated to: | Hauke Mehrtens |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hydSw/uR; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=hDWP9s6V; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NzkbR4yMNz23gM for <incoming@patchwork.ozlabs.org>; Sun, 22 Jan 2023 04:57:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GLwzCIgWRxESu4PPUK0Aozfl19FBT0dkwwTbz2yOqtc=; b=hydSw/uR2LHK0R jyWahasOeIJFGrrPVI48TY1jNok3eEJpdDy3vBMWqLf4LoV+ozp5sS8IFJOBGHIvah9Nsea8utyfE 6NOw48PFh3ijumdAaNG9JUXA9hPwS8dwsLuHQQhkPq1kM23A7vN0myc5ZMXlvRtuKNs8DBzzaXVaQ sbqPVKPCxqhvqVeU12L+QMXGgI4NBJsnywDtvtORQF1uaIegYZ6tydmVfs6xWmiTbt2OXgPDRVxXE TzdgUCqc3Aa3ohSqR3FmfcuWa85W0ZIBWAtRt3ZqVP4L6lKWyjKbaCPSinjc0SZncsPChssafZLt5 it9TuDr9SFldUiPhVhKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJI3v-00EDgK-DD; Sat, 21 Jan 2023 17:53:55 +0000 Received: from mout-p-101.mailbox.org ([2001:67c:2050:0:465::101]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJI3p-00EDfp-Hk for openwrt-devel@lists.openwrt.org; Sat, 21 Jan 2023 17:53:51 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4NzkW20t5Tz9spY; Sat, 21 Jan 2023 18:53:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1674323614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/1G38I1/ueB5hZm8pQONf0VLdGcjTOrSgRnw94sO0y4=; b=hDWP9s6Vk1ptF1v0McLkdlSMtyispr7JAmff1EQuG7cWbCz4C7p4zB8X7IwOtMNSz4wdoO 8ofwy1IkUazncXXekjw4/VdeudHbp1dOts1i4jWGRb7JxlsVR6wYLG4ZM7z0ysLdwIJO1S D9GMbU6+dvou/k3ZnJWtJkL5irX6Nd4gVkHJ8pRIzQetlJvwN1GI3yCWLkgNhuqG7AH8D+ AWVo6XxBgb5Ur69nNzodND1Z1XOgAtcvee8mDrYaXmPzFTKQIn/bm5lI0538Zkp9IRiGQe L6xSuECyw2CW2PeTMYXRNIlR3IF1PKh/G+fyWuqjfxKwp8rOMlrhMBIguDo1Hw== From: Hauke Mehrtens <hauke@hauke-m.de> To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Subject: [PATCH relayd] route: Fix compile warning with glibc Date: Sat, 21 Jan 2023 18:53:30 +0100 Message-Id: <20230121175330.438515-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230121_095349_965691_1246A4D0 X-CRM114-Status: GOOD ( 11.35 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This fixes the following compile problem: ```` /route.c: In function 'rtnl_flush': /route.c:45:15: error: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Werror=unused- [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:465:0:0:101 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
[relayd] route: Fix compile warning with glibc
|
expand
|
diff --git a/route.c b/route.c index c552d1f..602fdc9 100644 --- a/route.c +++ b/route.c @@ -36,13 +36,16 @@ int route_table = 16800; static void rtnl_flush(void) { + ssize_t ret; int fd; fd = open("/proc/sys/net/ipv4/route/flush", O_WRONLY); if (fd < 0) return; - write(fd, "-1", 2); + ret = write(fd, "-1", 2); + if (ret != 2) + perror("write"); close(fd); }
This fixes the following compile problem: ```` /route.c: In function 'rtnl_flush': /route.c:45:15: error: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Werror=unused-result] 45 | (void)write(fd, "-1", 2); | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ninja: build stopped: subcommand failed. ```` Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)