From patchwork Tue Aug 26 18:50:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4378 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:904b:b0:671:5a2c:6455 with SMTP id j11csp655945mac; Tue, 26 Aug 2025 11:50:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5vFHdDTKSblT0pDU94NbtE+8lbDPLeQS/NR9fqMT1r8P7cgcGBWF/AQBHB5iFX10mh798k57RkU0=@openvpn.net X-Google-Smtp-Source: AGHT+IEU4FlhgPNSLeI1A+GG91ximFgqgTcpnVGO0G2pht+P+xDzbKvdmfInIZO12BZxz1GIY8Cl X-Received: by 2002:a05:6808:1211:b0:437:75a1:34fe with SMTP id 5614622812f47-437852fda2fmr7675734b6e.42.1756234218724; Tue, 26 Aug 2025 11:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1756234218; cv=none; d=google.com; s=arc-20240605; b=Mm1Jv4MFR5EE/Jj1NpAeZ2VGS6Dd2e/OcJKbmJDFT/zGhl53k518aabH/WVPuqd7DS nCdiKhYPRMDRQms9MLJhqsX1DIdy9oUkty+Bc0gcsRoSJJJhgXNA3tZlR6e3uTwaO6R4 5+ODc1cw1uRXBWl8itriam43dekJw0SUo/szSiWokzh6Jn3+zA/VOh8mH30Pd8ws5sWC VCv0V58xRGIGKmvB5t24Fepk7qMyX0JbgJxTZiLEIfZ4PXOukI1U73brU7x2HevGcl0H sHVSJcMBGTchoVnkmeHsO7B28zlb57nMiX1kd9IBTXmZlXnEY6VxhxZQX7Hmrcsx83Y2 8cQA== 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=mUHVmqlXATw4X0ue3uRag4LbrHhR73S5k/na3ejwPfk=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=H/WA9vxRYXHAvw7HCsXTfBXzccNd9acJ2TtJbN1RCIKqVJNhX5jXmGZb9JMGCFQTLD kgsS8TOJURbrA2eqAZyKHjV6kN3EF0htXjWhFhZ+xYGmr4OiYoEhLqkZPFENebIa/0L2 ckxc0PQdhYyis00FEvObDD4pqsELqfkbcfwK2R/d6FATd7y/1Ekh8O/0M+oPdDRLRzoC Xs9AIWxmC11tjI5Go++KvDNS0InmLJMRkm4oqzGH2VSY94lTAMg46Wp5hfBUKy48kMqW WHTjLIKHcWzl1PAKmieSyQ2JQsQlPI/1w4YQaZEJvw9ssnPpew+hnmelYiPZohAmG4nr MxBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=Wy8gmT7i; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=TKKtgVWF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XHNpLHvV; 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-43796931882si1749027b6e.215.2025.08.26.11.50.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Aug 2025 11:50:18 -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=Wy8gmT7i; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=TKKtgVWF; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XHNpLHvV; 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=mUHVmqlXATw4X0ue3uRag4LbrHhR73S5k/na3ejwPfk=; b=Wy8gmT7ir/R0DoYF88eNKSZfwZ A6ZpsXdQq3ShNNz1+XSk7y44bOswHVqDmqLjCPQNoq68YWxQHf9XqFt//ARAd2GkLqZEmri7rCNtK oM58y380XbCYZ6q59fbPbSXrMslk0cG7Fpv1NJGc8xpQelsrAuC2VGUCw7/P6NnzeajU=; 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 1uqykK-0006Ny-R9; Tue, 26 Aug 2025 18:50:16 +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 1uqykJ-0006Nr-1a for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:50:15 +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=/18Cp83mykrs7m+L9azyZJh2jXIx8sI+JyXJ+L0qdgk=; b=TKKtgVWFesJIeyDHuyLNlAgiMo 9lo8OIx5OuTU/LdE39jB2JtYbBz9TmjXA44ti4O5+efl+i5rc2DvABIfVdg024Ndtk5v+eYM2Ak2G OWvn8vW6QOcQYB/wt29iJKMfbhaV6JEqQFD8g8XRHKAfgmcWGtHZyOLQuZcPWvPPOSss=; 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=/18Cp83mykrs7m+L9azyZJh2jXIx8sI+JyXJ+L0qdgk=; b=XHNpLHvVC7bFazn+WWh6fu+NV8 hcCFJHIEvMm3GJ6PsdFdDVbsfMOpBGrE2l+RHAos2OaJzbky3tkBMVBTjXMUpWM45LrHkUWhnxOUW 0idcP4GhxCmeHNq1mx5QSDrgWkOj0RDG9B+yv6pSiUpkzeSPPk+L2whvR+pB25IN7uqY=; Received: from [193.149.48.143] (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 1uqykI-0007WL-0c for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 18:50:14 +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 57QIo74q022190 for ; Tue, 26 Aug 2025 20:50:07 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 57QIo7xo022189 for openvpn-devel@lists.sourceforge.net; Tue, 26 Aug 2025 20:50:07 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 26 Aug 2025 20:50:00 +0200 Message-ID: <20250826185007.22157-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 compress_options.flags is already unsigned. Make sure the individual flags are as well to avoid spurious conversion warnings. Change-Id: I6a0d352a039a0936cb9bbedf6168cd6eecd053ea Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URI: openvpn.net] 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1uqykI-0007WL-0c Subject: [Openvpn-devel] [PATCH v8] comp: Make sure comp flags are treated as unsigned 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?1841545052286299979?= X-GMAIL-MSGID: =?utf-8?q?1841545052286299979?= From: Frank Lichtenheld compress_options.flags is already unsigned. Make sure the individual flags are as well to avoid spurious conversion warnings. Change-Id: I6a0d352a039a0936cb9bbedf6168cd6eecd053ea Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe --- 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/+/1102 This mail reflects revision 8 of this Change. Acked-by according to Gerrit (reflected above): Arne Schwabe diff --git a/src/openvpn/comp.h b/src/openvpn/comp.h index 265e15d..0354896 100644 --- a/src/openvpn/comp.h +++ b/src/openvpn/comp.h @@ -32,23 +32,23 @@ /* Compression flags */ /* Removed - #define COMP_F_ADAPTIVE (1<<0) / * COMP_ALG_LZO only * / - #define COMP_F_ALLOW_COMPRESS (1<<1) / * not only incoming is compressed but also outgoing * + #define COMP_F_ADAPTIVE (1u<<0) / * COMP_ALG_LZO only * / + #define COMP_F_ALLOW_COMPRESS (1u<<1) / * not only incoming is compressed but also outgoing * / */ /** initial command byte is swapped with last byte in buffer to preserve payload alignment */ -#define COMP_F_SWAP (1 << 2) +#define COMP_F_SWAP (1u << 2) /** tell server that we only support compression stubs */ -#define COMP_F_ADVERTISE_STUBS_ONLY (1 << 3) +#define COMP_F_ADVERTISE_STUBS_ONLY (1u << 3) /** Only accept stub compression, even with COMP_F_ADVERTISE_STUBS_ONLY * we still accept other compressions to be pushed */ -#define COMP_F_ALLOW_STUB_ONLY (1 << 4) +#define COMP_F_ALLOW_STUB_ONLY (1u << 4) /** push stub-v2 or comp-lzo no when we see a client with comp-lzo in occ */ -#define COMP_F_MIGRATE (1 << 5) +#define COMP_F_MIGRATE (1u << 5) /** Compression was explicitly set to allow asymetric compression */ -#define COMP_F_ALLOW_ASYM (1 << 6) +#define COMP_F_ALLOW_ASYM (1u << 6) /** Do not allow compression framing (breaks DCO) */ -#define COMP_F_ALLOW_NOCOMP_ONLY (1 << 7) +#define COMP_F_ALLOW_NOCOMP_ONLY (1u << 7) /* algorithms */ #define COMP_ALG_UNDEF 0