From patchwork Mon Dec 8 17:03:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4661 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:29c3:b0:7b1:439f:bdf with SMTP id g3csp794422max; Mon, 8 Dec 2025 09:03:33 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXCyH7m/PK8FrTHFz/XSC9xrNaF5Pf7jYVbukO1CG+6rQ8oNnmEfOqlxkaym/1XChwCyM1dXpeenMQ=@openvpn.net X-Google-Smtp-Source: AGHT+IE2qGxLVHEGdi7P9GXC0r8ORD6ZSi8CKDmzL71iX4PneTy6f7rkAQ5hsJOyh7+HdViD37Ld X-Received: by 2002:a05:6871:2b28:b0:3eb:b2db:8db5 with SMTP id 586e51a60fabf-3f54414120amr3629822fac.51.1765213413547; Mon, 08 Dec 2025 09:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1765213413; cv=none; d=google.com; s=arc-20240605; b=e92x/gR1zoG98s+OhJo7kvOHvjHrG3hhDjrNrNEU+9rryu0TalUn1VRVCiatbv3p9a NUzJ+53s4Euc/M2ZM4PBkYtWb0vnSIYDfLD8yVQvCpyKDqd9O/RXnVvz7jSyeveYZmTx FL0GCeELbNt+qQ2z1uou2iMCWL/tYvMYWBFRR9IKkAYLqXt7QPbFiqreZp1aJsPao/tF 5qbAaacrbQF1z47nYRLjNHWfRFrNRdFSRtI2PzgDUmRhO9m2y+uLUYswWokyZs9QvwXn GhxMUbmbF01oMscwj+aNWzBBU5HcPVcina6KUc5HHQc9kGaXDvThTbxLWdsV3PWKuQqk fMPQ== 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=pNKnb85VZgXAdo8pNUKVfAjFD83khcga/Z+1GRDOjyc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=PlO/jcrYCGiubcCskx58zCEZJsRoaMLIYWz83vGDIXGkL0Jg0vJMxCtkNSMoAoj4NW 2QokTkTdAkiVy0tVZ2WmQuSiMoxC1okBNWF+ZPzTPJpb03Oj9DHRlr0CFZk8D/OnianM r6v/37ZLpAUB8rQbX7amQV/zzOGxQN7AIekkhgpqdKlXmFgit+T9BKaoNFwNqjrzP2i8 REj35VM73dZTS3JtxJuSat0dNRGZL/unjR+eUNSevfS9m1MDMpsGh5UInAW6qdt1/O07 lVgv3RHzdaRTc3wpJxM/JAwN/ULpkA3vUU6lOdxknrZXjdcPaESA8TJCSmOLM0VftiAd KiRA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=JRED5YmC; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gVh3tIFS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ldE5NzTs; 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 586e51a60fabf-3f50aa210b2si7217304fac.232.2025.12.08.09.03.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Dec 2025 09:03:33 -0800 (PST) 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=JRED5YmC; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gVh3tIFS; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ldE5NzTs; 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=pNKnb85VZgXAdo8pNUKVfAjFD83khcga/Z+1GRDOjyc=; b=JRED5YmCS0mu+2uOgiQ78ckN4x +1UIOsDF9HDLCqUrtJSsL72Qo9yMYK5HZxXZHh/Iem3zgBnWdjgn+y88CJxUGuipgZwiE3amBXVay +95DhWkebKil7va0FpkG+rqouZRb2ehilSTD3saIyV/xPSuhVokKC1TyHhwo4M+pXkTQ=; 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 1vSee2-00071q-Ev; Mon, 08 Dec 2025 17:03:30 +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 1vSee1-00071k-5a for openvpn-devel@lists.sourceforge.net; Mon, 08 Dec 2025 17:03:29 +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=mXe/XhHdAgFwg3MFLy96ms1uEfFQovwsVNPjjbnLR+8=; b=gVh3tIFS884eycOzNoaaWblgev EBvT+eeXBykyoPcPBotZqWk+HAV9bN9qrZbyELO8HfDNrnxGFbTDlL/FK4StTQxUkS576/Y0p2rD5 eh78AK2u/1rRrUziZXC0vG3pfBrnIvHIYSGBzU0KSy3dX283EY8lqySKyBm+ogychUr0=; 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=mXe/XhHdAgFwg3MFLy96ms1uEfFQovwsVNPjjbnLR+8=; b=ldE5NzTsNH59cwyOlXWFSgIgHO aS1H6+WbcPbJn//3lmnyVtAGaOj5MjK1h8rjTkVau+So5odEWID1ur2I40lmDvJ3JN4TN6V3iEzon ohztAtq/L8B7QVBlMn1NogQISPSFxvZQbeNBSNLk6RvPmM4WMemlFbXMnF8Wv4QImvHI=; 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 1vSedz-0002ib-UL for openvpn-devel@lists.sourceforge.net; Mon, 08 Dec 2025 17:03:29 +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 5B8H3LE0004709 for ; Mon, 8 Dec 2025 18:03:21 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5B8H3LTu004708 for openvpn-devel@lists.sourceforge.net; Mon, 8 Dec 2025 18:03:21 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 8 Dec 2025 18:03:13 +0100 Message-ID: <20251208170320.4696-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.51.2 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-1=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_Frank_Lichtenheld_=3Cfrank=40l?= =?unknown-8bit?q?ichtenheld=2Ecom=3E_We_have_false-positive?= =?unknown-8bit?q?_=22=E2=80=98addr=E2=80=99_may_be_used_uninitialized=22_war?= =?unknown-8bit?q?nings_with_MinGW_13=2E0=2E0_compiler=2E?= =?unknown-8bit?q?_Work_around_them=2E_Change-Id=3A_I999916f9561a638214b70cf4?= =?unknown-8bit?q?3de78060e9e0e792_Signed-off-by=3A?= =?unknown-8bit?q?_Frank_Lichtenheld_=3Cfrank=40lichtenheld=2Ecom=3E_Acked-by?= =?unknown-8bit?q?=3A_Gert_Doering_=3Cgert=40greenie=2Emuc=2Ede=3E?= =?unknown-8bit?q?_Gerrit_URL=3A_https=3A//gerrit=2Eopenvpn=2Enet/c/open_=5B?= =?unknown-8bit?q?=2E=2E=2E=5D_?= =?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: 1vSedz-0002ib-UL Subject: [Openvpn-devel] [PATCH v1] socket: Initialize struct in_addr_t in getaddr() 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?1850960420415582600?= X-GMAIL-MSGID: =?utf-8?q?1850960420415582600?= From: Frank Lichtenheld We have false-positive "‘addr’ may be used uninitialized" warnings with MinGW 13.0.0 compiler. Work around them. Change-Id: I999916f9561a638214b70cf43de78060e9e0e792 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1420 --- 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/+/1420 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 80c2895..3e90833 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -202,7 +202,7 @@ getaddr(unsigned int flags, const char *hostname, int resolve_retry_seconds, bool *succeeded, struct signal_info *sig_info) { - in_addr_t addr; + in_addr_t addr = { 0 }; int status; status = get_addr_generic(AF_INET, flags, hostname, &addr, NULL, resolve_retry_seconds,