From patchwork Thu Oct 30 19:38:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4551 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7001:2f13:b0:72f:f16c:e055 with SMTP id sa19csp1156633mab; Thu, 30 Oct 2025 12:38:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUqpBYdh8OiH+EamqKHd33pYb4SYUyFjknv1k0hKM8ZxImo9jHgsVQL3SK29j5ADiEuaO6yjovqHTI=@openvpn.net X-Google-Smtp-Source: AGHT+IHEzfXsXemGhmqBAjGhoLXiPsJwy0wGw5Dal79ekpJLzpcIrlQTt0TfpCGh15+/wlvCVxKF X-Received: by 2002:a05:6602:658:b0:943:5a3c:7525 with SMTP id ca18e2360f4ac-9481500c75fmr713219839f.1.1761853129946; Thu, 30 Oct 2025 12:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1761853129; cv=none; d=google.com; s=arc-20240605; b=GWk+ZVrii83Qxz1vBvvi0SirRtktC2Ky2jNERqZu2obi7HIexf3iwgv4in1hozNpwz QNIm82YS7gpaHN22BqTi6HWz3XkCU7Okq37RaikO831DStrQLy76DmI9kDwzIPzr5Ilp h5AxLhGtI4DXLIQhLnxa/SRcG3+Zlk8rHgqsYlesN4nDSdGUE3MvQAOxMymj0md6RB1m 3/IUOJZdHHXkSN9WvMOvAZ1Q4BSeF9A4cRJQJfdCueye13aloVOdi0zRGUs+tLqN8S/i 29Acrg8Pso77SVNuJ4ZonfFAU/nU15y8x3e2yZAUWtNaw6nchiEViBf7/mXoJhfEBdJ1 0UqQ== 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=WlE7uhlocjXfbWAFxjYrR7pxuUCrL56IiaYxSpHDrxw=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=CDjeLmAG7o7BjtM/QvCcTYzso58rVuINzOf/v/4NcSgg+2RPyPksPSoHjfL27+l5tN PPiYYa8TDYAaazio/Gkb4I+SczfQCxkhqeyQQIEl1VBwAcQl9Ve/iXa1ATSO9N5tC01A mmDz3RTcdioKzWGIWObabfZ/CJWdBUb7+VCk2ydkXdPlSjaKdB6J5H6o9c/ariwWXP8C VrvH7Ve5fqZaG+cjCgqSETuZkRkxuFSgeilZRMoSAk8FBQ2XVgP+pk9TNe3NaymriXQL RR8yPTfGbTV2iSninFUvYxnb8BrPCTYrAGGUGTWtsCbOLj3+GYxh+F52sOilq8FliBx8 w2zA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SL+4Uoab; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MoBRUFZS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZhLUaUQb; 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 ca18e2360f4ac-945a4b48d7bsi1086250439f.99.2025.10.30.12.38.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2025 12:38:49 -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=SL+4Uoab; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=MoBRUFZS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZhLUaUQb; 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=WlE7uhlocjXfbWAFxjYrR7pxuUCrL56IiaYxSpHDrxw=; b=SL+4UoabL8hPOrE/fxMQPOHAb0 dClKcBOUe1dMyWstD9200QqRA0aXYfgofa6y80Cdimeo/oKf2ZtpTVFjR3/aWiCwxDNqNLfw2OanE P/WEnoQgwhR4NPfFkb2Qom1/sGg/4V9t+sKTYsCrPA66YrUwV1BONPL9mrAdJOW6zRwc=; 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 1vEYTw-0006Gd-3i; Thu, 30 Oct 2025 19:38:48 +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 1vEYTu-0006GV-Q9 for openvpn-devel@lists.sourceforge.net; Thu, 30 Oct 2025 19:38:46 +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=/h2XTabrq9zFw5Jh/MIqxafRyH94Mwfk881jqBS0rRs=; b=MoBRUFZSHmb/QCu+33aQtw2UCt /l3b/H170tI9wV6z+zXtzAadIxagJKt1rBbQwr5G4MxpxImH7JOou5Pc89DAJAvBGaWxvAryDrkyp TeZ3nop+DjhjsP93mLA2wToyNSJlhYYZk1tEs1cGtJUigQDmvO0zDY+Z8ggj+b2eZocw=; 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=/h2XTabrq9zFw5Jh/MIqxafRyH94Mwfk881jqBS0rRs=; b=ZhLUaUQbpVXE8la/rHFl3MvpTJ n+/NmXmJnfMCK2ZTkq/SJqz4SI4srGQNxMDCwG1ncKMepnl1y8W5RDzfgR9ZOZKlKTZUjVJDVAEHK ggLIfPkXwzQ0xaTi2QPsMvpGIg6ynUfJDlDzLVGL9y1cohJLv0pJURa2M7hbtJEOjXgk=; 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 1vEYTu-0001DK-3V for openvpn-devel@lists.sourceforge.net; Thu, 30 Oct 2025 19:38:46 +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 59UJcYQ8001215 for ; Thu, 30 Oct 2025 20:38:34 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 59UJcYNd001214 for openvpn-devel@lists.sourceforge.net; Thu, 30 Oct 2025 20:38:34 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Thu, 30 Oct 2025 20:38:20 +0100 Message-ID: <20251030193834.1186-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: Arne Schwabe When compiling with cmake -DCMAKE_BUILD_TYPE=ASAN under Ubuntu 25.10 (gcc 15.2.0). Explicitly cast these instances to uint8_t/unssigned char to silence this warning. 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: 1vEYTu-0001DK-3V Subject: [Openvpn-devel] [PATCH v1] Fix warnings about conversion from int to unsigned char/uint8_t 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?1847436907748947548?= X-GMAIL-MSGID: =?utf-8?q?1847436907748947548?= From: Arne Schwabe When compiling with cmake -DCMAKE_BUILD_TYPE=ASAN under Ubuntu 25.10 (gcc 15.2.0). Explicitly cast these instances to uint8_t/unssigned char to silence this warning. Change-Id: I648ee99b1152b1248d1b3e64af7679ab99f1388f Signed-off-by: Arne Schwabe Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1328 --- 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/+/1328 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/httpdigest.c b/src/openvpn/httpdigest.c index be20638..3e6520a 100644 --- a/src/openvpn/httpdigest.c +++ b/src/openvpn/httpdigest.c @@ -46,7 +46,7 @@ } else { - Hex[i * 2] = (j + 'a' - 10); + Hex[i * 2] = (unsigned char)(j + 'a' - 10); } j = Bin[i] & 0xf; if (j <= 9) @@ -55,7 +55,7 @@ } else { - Hex[i * 2 + 1] = (j + 'a' - 10); + Hex[i * 2 + 1] = (unsigned char)(j + 'a' - 10); } } Hex[HASHHEXLEN] = '\0'; diff --git a/src/openvpn/mroute.c b/src/openvpn/mroute.c index b50d48f..d17902f 100644 --- a/src/openvpn/mroute.c +++ b/src/openvpn/mroute.c @@ -337,7 +337,7 @@ } else { - ma->v6.addr.s6_addr[byte--] &= (0xFF << bits_to_clear); + ma->v6.addr.s6_addr[byte--] &= (uint8_t)(0xFF << bits_to_clear); bits_to_clear = 0; } }