From patchwork Mon Oct 6 17:04:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4467 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:7505:b0:72f:f16c:e055 with SMTP id r5csp6974634mai; Mon, 6 Oct 2025 10:05:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtFV0ocj4TK5Sqmkoyq4ojkPKugf4v7Krx+ZMtEEYOxkHsPChSwuhYgeyNj8/4xPn4ix6lHWdRulI=@openvpn.net X-Google-Smtp-Source: AGHT+IFFc9UT4NYiC1MUAljpXWLqy9KTlyjkJj6fQtViDOar1AqI1XzMowEXznltGjQYcK+wt5TG X-Received: by 2002:a05:6808:14c7:b0:43f:95b5:66e with SMTP id 5614622812f47-43fc17931b7mr6124076b6e.14.1759770321123; Mon, 06 Oct 2025 10:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1759770321; cv=none; d=google.com; s=arc-20240605; b=CIA5JusqVNu/7lgXVDe5MR4olGlcC+WJBHNNyJkAozQvkuKnXmSxyuUOc+tSDi0uuD bvJ/Jj6DWiwURZW4VqJ/jD0iaA3VI6Qj7kUBg1i00h0pQm4VWPLNhLEZoNjighm9yDlN ywWln82+gVuXU5kiHP2yKY4vZgXZXrEf2Jcam/skDVYGaME3C+zriECG9fSxnMVAzjOo JKH+4OJL731tqvLpu+eo/R/9ul9A2xdIsV6r4NcReoYR1sIipE8UhsCK82yKjdNBj/b3 c706/A6PeHRgtDfHotQXQyVVuJCyMOWbX+cp4IbDKz6KEFo+DojFCE0jxHx0Y39oi4kM oaug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=ronLJeSU9k227/Dy9Vy8tRhMmLqKh7szaIcVlNLR/8c=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=PZ24o/A6l1QUy5Do/5xk5vSkzIiEBXl25XhlCGmNy6xc3UKHcJB+O2a/1bAMAzWGdg cVmq/Uop1AzE2qlkahmUNRU+aVaFkvTAf6BgX+YGjXCzdDW5RUt501ovLE59JrXm+xAY cxdE7Ao8m4S3VUSrrmJTxYOLtXuIzxpNqdcL9ST7xByW3z9agjiD0Y45eqwIuaFAUsaj R3TXoiMNK7gY6oGBd5SkfIAHs1y3aW4W1fc+yWTu7jrsdam1K6nao7rof/+g2pRkbwPp Mc6dB6kD8qTSRp4jIQbBJV5vtz6ivWdgPIRT+lK5ZSRAsHYQfQDv+irfhLB9fuEPbfYH X7SA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=hslZkIhk; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ZMFZY1e2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NdHuKszr; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 5614622812f47-43fc192b1b6si2617952b6e.190.2025.10.06.10.05.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Oct 2025 10:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=hslZkIhk; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=ZMFZY1e2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NdHuKszr; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ronLJeSU9k227/Dy9Vy8tRhMmLqKh7szaIcVlNLR/8c=; b=hslZkIhkm7xnK3jqNQvWneRCFp aQ3W544TjKn/wXIrhpS5K2uEAEmIi9aNACZOQ1WLlxYxzjwqKMoGw2UDGDVgTZ9TmFlGkZ2Rgysrq 5Hj9RwWshhfymue2qX9SfhoobZ/CdWAomJULnG6haWBrvlvlLN6FOrAesee1rxR57s1c=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1v5oeF-0001uv-0Z; Mon, 06 Oct 2025 17:05:19 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1v5oeD-0001uo-D1 for openvpn-devel@lists.sourceforge.net; Mon, 06 Oct 2025 17:05:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=t4tGEj2S1te3sm6igQbsjR+flFCdpJjJoQ7sM9lU/2Q=; b=ZMFZY1e2q82AUzggGhyDyzOKvG uQohHNUmNGx0IYAvE3A9YPAN09c/n/1VaIvnTDQzmNdFUNW4yrMtKJJkGtVFONzieqXGoFvOMGI10 /xIf9uP3Y6fA2p3d9Q4dd8JU+Ww6sn1YaQpcSi4Y3fbmmgNIvCZYnp0+Q0PFw66Hfbho=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=t4tGEj2S1te3sm6igQbsjR+flFCdpJjJoQ7sM9lU/2Q=; b=NdHuKszrru0+AxWvA9L38BOOP+ ALAnLSN+TdD1WXaUcjixkmaGy7Afaol1Gr9/G6HYgEiFSNoIWhKsO4hIS1eRaRTN/jnXxyxmHnnsk raX/XPUhhlnopbxnSGMftV2bYTL4FiAB8I9dGTA4/epAKYOJyFHBbbrlG4EUK9Xm5AGY=; Received: from [193.149.48.134] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1v5oeC-0008Rr-GU for openvpn-devel@lists.sourceforge.net; Mon, 06 Oct 2025 17:05:17 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 596H55D1007254 for ; Mon, 6 Oct 2025 19:05:05 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 596H55AI007253 for openvpn-devel@lists.sourceforge.net; Mon, 6 Oct 2025 19:05:05 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 6 Oct 2025 19:04:58 +0200 Message-ID: <20251006170504.7235-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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: From: Frank Lichtenheld Just use the correct type. Change-Id: I8919c9efdf85424a124a0d54593cd1dbf3bc2341 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/open [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1v5oeC-0008Rr-GU Subject: [Openvpn-devel] [PATCH v2] mtu: Trivial -Wconversion fix X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1845252924523852896?= X-GMAIL-MSGID: =?utf-8?q?1845252924523852896?= From: Frank Lichtenheld Just use the correct type. Change-Id: I8919c9efdf85424a124a0d54593cd1dbf3bc2341 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1250 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1250 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/mtu.c b/src/openvpn/mtu.c index 66f81a6..9e152df 100644 --- a/src/openvpn/mtu.c +++ b/src/openvpn/mtu.c @@ -280,15 +280,9 @@ struct timeval tv; }; -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const char * format_extended_socket_error(int fd, int *mtu, struct gc_arena *gc) { - int res; struct probehdr rcvbuf; struct iovec iov; struct msghdr msg; @@ -313,7 +307,7 @@ msg.msg_control = cbuf; msg.msg_controllen = 256; /* size of cbuf */ - res = recvmsg(fd, &msg, MSG_ERRQUEUE); + ssize_t res = recvmsg(fd, &msg, MSG_ERRQUEUE); if (res < 0) { goto exit; @@ -394,10 +388,6 @@ return BSTR(&out); } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - void set_sock_extended_error_passing(int sd, sa_family_t proto_af) {