From patchwork Thu Jul 23 18:04:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5124 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6384:b0:87d:a69c:34be with SMTP id i4csp908442mag; Thu, 23 Jul 2026 11:05:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RqCukeQnsuX0qY5Gb9G3iZT5KQrpWWCKNxPH62sbmsdBmCcfAYo/X0Cf6Ys4MOEMpEr4OIVTL9xLl0=@openvpn.net X-Received: by 2002:a05:6820:4b03:b0:69e:41d8:f7e9 with SMTP id 006d021491bc7-6aad40fbe20mr1904350eaf.44.1784829900617; Thu, 23 Jul 2026 11:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1784829900; cv=none; d=google.com; s=arc-20260327; b=mGJOkeDBQHugpCCnOUHAdZLY7ukTkk95DRGve7uHK39ZYoyh+Gr+5Ki1zO0Wl7Iu27 Z3BD0KQJfh9vOxOcu+tS63WVIwoMnS2f02GViYVAKbAPfgaMP1N2IJgqVP2m29leXzZb JoSAQIpQkecyw8yQ4T5qVS11X1oQiM1gwSWqOHljtu71VXYl1FrywsLgPu9bpqMfQ6R/ 25TLdOQUD1uOGehQHTWnVD1Vm9wIF9eNT8mWmEcnmvHOTj7TV79cbKbpUugx6fXo1YCX QQyEeggzfXwZMaDlvLbmipelE0nd/Gpq4Crqn6uwLT/3R6ztcEs21JQcnKy1vBbpKfYP vOog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; 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=FOhEkkcxLZl66u4ezthoOHbbghXvL+0Up1QD63QyY0o=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=mezeXuQuE7taH9dTone7Jb0V5X+/2CxapiakFK2A4IjCMyKfubi4UtMITkqTFSY7eZ CxTK2Fr7XA3e3tNT2FRMmyeiHEnVCe9Xkv0/L83e0uNYziu3rIg6231e40hjUQ3ui2wz dwyTtJ3ts4l/8mw21cVTJr+5pGJdhvRlGVG3sUCrWa048D/w04PZzJBh3cYcsgTAnZW/ ADsREaIStTrfZbbKXQIU8CsycatzLuc1ysaGqVxg9OhpLDtUdauaBKAEVaeS3t9w8pum THcCnY9F4HSuw+31bsytFidYu5A6rlUaMXwx7+KGpYT5mNsb2OIJXESVPNFK2WxJLTTH Ey0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=c6ziKqFz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Kf+njg8l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CMIq6IN6; 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 006d021491bc7-6aae3dbc4a9si156257eaf.62.2026.07.23.11.05.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jul 2026 11:05:00 -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=c6ziKqFz; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Kf+njg8l; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CMIq6IN6; 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=FOhEkkcxLZl66u4ezthoOHbbghXvL+0Up1QD63QyY0o=; b=c6ziKqFz1wz77TGgvcvGVqJ7x2 FLOBDKeOPu5iOXYLOcQ86DEFuhuOU3VBpaU5jNwSVGnfstEhjbobR12bML91WB/Wckixx/Ov0q5mJ JkNJX7J0ygWZGhXD7AhKPdHxtyNQByN4FJensa8DGXoSgGwJstKven6q7CLRh9SZ+yHQ=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wmxmy-0001Ew-NE; Thu, 23 Jul 2026 18:04:56 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wmxmx-0001En-Ei for openvpn-devel@lists.sourceforge.net; Thu, 23 Jul 2026 18:04:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc: 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=4i3NKhJCvvNB3+dCp/fFcNTuqTYMGUrijC2udZfso8E=; b=Kf+njg8lm5w611WaDLdvb/XBp8 Esi4NPJ9sML/r+z7EX/SpP/BNOhsaSNkri/OcuN58amXacSMh+xE6n4XfSDKa0bBjrlQsJE8xErgS Ts6HRBh4Z2Iobay27MeeK9gGpVp7WwcSoNpEYy7wJn5e9ENTrkEru6YqFUy3WSwrzGE4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc: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=4i3NKhJCvvNB3+dCp/fFcNTuqTYMGUrijC2udZfso8E=; b=CMIq6IN6jIbltO/4MjTZc+dcTd 580/uOz76aL8GSVC8Hi0gyTGo64H0h9fjbGqhQG2JjXlVFLww+SsQWxxL+6wuq5MKYCRbeKu6RoE3 POa1mmIzwS94GaQJLwI6lqDD/lLYVyuF/6i+InD0vzLGWGxp5vXb4U3vDoQ3fNmiq2g0=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wmxmy-0002TO-Ta for openvpn-devel@lists.sourceforge.net; Thu, 23 Jul 2026 18:04:55 +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 66NI4kqe017433 for ; Thu, 23 Jul 2026 20:04:46 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 66NI4k49017432 for openvpn-devel@lists.sourceforge.net; Thu, 23 Jul 2026 20:04:46 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 23 Jul 2026 20:04:38 +0200 Message-ID: <20260723180445.17392-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22sfi-spamd-2=2Ehosts=2Ecolo=2Esdot=2Eme=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Arne_Schwabe_=3Carne=40rfc2549?= =?unknown-8bit?q?=2Eorg=3E_When_compiling_with?= =?unknown-8bit?q?_low_optimisation_level_gcc_complains_route=2Ec=3A1783=3A44?= =?unknown-8bit?q?=3A_error=3A_conversion_from?= =?unknown-8bit?b?IOKAmGludOKAmSB0byDigJh1aW50OF904oCZIHtha2Eg4oCYdW5zaWdu?= =?unknown-8bit?b?ZWQgY2hhcuKAmX0gbWF5IGNoYW5nZSB2YWx1ZSBbLVdlcnJvcj1jb252?= =?unknown-8bit?b?ZXJzaW9uXQ==?= =?unknown-8bit?b?IDE3ODMgfCByNi0+bmV0d29yay5zNl9hZGRyW2J5dGUtLV0gJj0gKDB4?= =?unknown-8bit?b?ZmYgPDwgYml0c190b19jbGVhcik7IA==?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=281=2E3_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_1=2E3_RDNS=5FNONE______________Delivered_to_internal_netwo?= =?unknown-8bit?q?rk_by_a_host_with_no_rDNS?= X-Headers-End: 1wmxmy-0002TO-Ta Subject: [Openvpn-devel] [PATCH v1] Silence warning with gcc 15 and O0/01 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: 1871529797829866839 X-GMAIL-MSGID: 1871529797829866839 From: Arne Schwabe When compiling with low optimisation level gcc complains route.c:1783:44: error: conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Werror=conversion] 1783 | r6->network.s6_addr[byte--] &= (0xff << bits_to_clear); With higher it apparently detects that this is cannot be and does not trigger the warning. Explicitly cast to uint8_t to silence this warning Change-Id: I96d3698601bb5aac3a0d7ac6ac5b5dd23c975517 Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1731 --- 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/+/1731 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 81ce867..8ea745d 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1780,7 +1780,7 @@ } else { - r6->network.s6_addr[byte--] &= (0xff << bits_to_clear); + r6->network.s6_addr[byte--] &= (uint8_t)(0xff << bits_to_clear); bits_to_clear = 0; } }