Message ID | 20251008170202.10333-1-gert@greenie.muc.de |
---|---|
State | New |
Headers | show
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:7d42:b0:72f:f16c:e055 with SMTP id fr2csp1085225mab; Wed, 8 Oct 2025 10:02:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWtLUl/Vf9D4yO5v9ZexAs2FcCb/1Udf/ElrpXROSawJ4a3IY3wIyEb29nQHjdJjeXxYnL7GAEPl2w=@openvpn.net X-Google-Smtp-Source: AGHT+IGZZfLWVwAyzMAHMvYl2atxCYA4ZEmPAjuVuOGW7X7wwt+ma5QFDpIHYUBOpWYrzE9eunPD X-Received: by 2002:a05:6808:384f:b0:43d:20d2:aec3 with SMTP id 5614622812f47-4417b3b1653mr2167665b6e.32.1759942934494; Wed, 08 Oct 2025 10:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1759942934; cv=none; d=google.com; s=arc-20240605; b=VwE72yYk0V5rSsSNi5+nY1wSCLOSk7WBslnLcxU72Q4782oSfBcxnBfHylGz1fk777 qIDUqR1RXE0VAHyVcEXkM2AlRI1wxXpdt1VACVVoSDb8SQW3+U6+DgIVVPKJb3iDb4T0 IUEczb6XPCKrpYzkbLIeH9+HM+LG2/ArT/AZ95qJtEIM/9uBs+Sj5C+wJaNpX9fDWscQ eRoXdNgNG4FzJcA3MkO/RbnjbRSPno1QUY/9izuH1Zg2gRrdr2hMIgrFVMfgDp9XaXFL 3DeRU/9o4fxosmZaVYkDrJue4FXiUQ+b2jAM09xCE0DeZ9n7Y8swUMWVSeCh50xswvuq TGmA== 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=wQqyP9PCY3sbFU35R9GJ3SNPVAmA+YwvxD1NEvb34g0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=OxqwnuJTlhKRkKHTmdXFxQbxeF+ZoIcs0q5vy3sgQC+H8licnMAhqYksu4u94O7oMq ElZOcDb1xMb+8g+64mN/D9sk9PL7+WJS36HgBy0An4YkajDzLBwWSYCElWTy8NQ/yqhg MlmuYjclk/rnP2eYFSDC/2tOYaRd/Gj+2VAYmz6bWG5I53Q4fis4MmcJ5795kj0RfBfE 3cMYeItIK7GufwuPHiW1dRAcDReZsBWUF4ICXhNt3LIiqBsVwgBPSf09sheZbBuRpB/N IuAlQx3Bo258N/DimX1CX7u+T3cH8/0GKxzbbinNICqJhdQfiRhF6iL/LjG8e3z59L2J dzBw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=k7Y+7obk; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gQeU7wQg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=amoEmpL5; 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-44189ade7d3si106969b6e.147.2025.10.08.10.02.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Oct 2025 10:02:14 -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=k7Y+7obk; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gQeU7wQg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=amoEmpL5; 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=wQqyP9PCY3sbFU35R9GJ3SNPVAmA+YwvxD1NEvb34g0=; b=k7Y+7obkpD6O1T/vG6EBdcfEyF ncKjo62LamE1BC8d5+er0wQAWSQnI7k5v8RVVbwiAF/BK1/SGVo5qpaQPxf0Pwcy2cvj9qydavkRw XFy9nUoF/NCalBQw8KlRQo/iaJlSpWmE1k8BGcOKYfJdrabALy7I6vm5ZxLcxHp+7TpE=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1v6XYK-0003GU-1E; Wed, 08 Oct 2025 17:02:12 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <gert@blue4.greenie.muc.de>) id 1v6XYJ-0003GO-6F for openvpn-devel@lists.sourceforge.net; Wed, 08 Oct 2025 17:02:11 +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=TkxXUDEEPyDALQamaTgnRuMXzJC28uAlZqE6VESSGE8=; b=gQeU7wQgOs/J2RISkdT7BoZV2v dgUS1fxPWtxNEa9MYS3xc/9lwm4qQrIJdnx96+O0moPHGRle7KTULwpDJZA/g2AYOGynmp45X3X+t RKxFLGc0uYt4UBuDp1kmxJh91ny5GHtPkVKhIR7IMFtw+maeHhP8iPRrbu9BFIPze++Q=; 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=TkxXUDEEPyDALQamaTgnRuMXzJC28uAlZqE6VESSGE8=; b=amoEmpL55beZ6WGsyttPQtFsxT 4R7pBJ98ubVGl6p9RlGO8AWcRH8JN38NAbUGZUucVBL5WIMb/fTocRbYqZ5hu+0zRfYDhoCAoOX1C uDhdSEVsRy4B1+fSNvrvF5YxoVl7jYQpHC7CHVD3n7+7vJmbEAqzXpjVcqdfHbQAk0Ow=; 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 1v6XYH-0007yZ-Gr for openvpn-devel@lists.sourceforge.net; Wed, 08 Oct 2025 17:02:11 +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 598H23O4010351 for <openvpn-devel@lists.sourceforge.net>; Wed, 8 Oct 2025 19:02:03 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 598H23SB010349 for openvpn-devel@lists.sourceforge.net; Wed, 8 Oct 2025 19:02:03 +0200 From: Gert Doering <gert@greenie.muc.de> To: openvpn-devel@lists.sourceforge.net Date: Wed, 8 Oct 2025 19:01:57 +0200 Message-ID: <20251008170202.10333-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.49.1 In-Reply-To: <gerrit.1759942426000.Id08524661aa5bcc5cd42f27a1aacc636e2b2b004@gerrit.openvpn.net> References: <gerrit.1759942426000.Id08524661aa5bcc5cd42f27a1aacc636e2b2b004@gerrit.openvpn.net> 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 <frank@lichtenheld.com> The whole purpose of the function is to make sure that cast is safe. Change-Id: Id08524661aa5bcc5cd42f27a1aacc636e2b2b004 Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> 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: 1v6XYH-0007yZ-Gr Subject: [Openvpn-devel] [PATCH v1] options_util: Fix conversion warning in atoi_constrained X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1845433922399857487?= X-GMAIL-MSGID: =?utf-8?q?1845433922399857487?= |
Series |
[Openvpn-devel,v1] options_util: Fix conversion warning in atoi_constrained
|
expand
|
diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c index 8a1c083..eba7d39 100644 --- a/src/openvpn/options_util.c +++ b/src/openvpn/options_util.c @@ -162,11 +162,6 @@ return (int)i; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - bool atoi_constrained(const char *str, int *value, const char *name, int min, int max, msglvl_t msglevel) { @@ -194,14 +189,10 @@ return false; } - *value = i; + *value = (int)i; return true; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - static const char *updatable_options[] = { "block-ipv6", "block-outside-dns", "dhcp-option", "dns", "ifconfig", "ifconfig-ipv6",