From patchwork Tue Nov 11 17:24:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 4582 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:33c4:b0:7b1:439f:bdf with SMTP id u4csp2039152maf; Tue, 11 Nov 2025 09:25:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVqi5vpvX1Gp91O9ClxiGMOxQ6xw+V0r7VwyOcnZOsHW7MpIkG4WSebWdSO+T8w4AOVtvHT0r8Wb6k=@openvpn.net X-Google-Smtp-Source: AGHT+IE4RK3BFgiBncgQiLZdcc5gQBDC/FbxKxD00Elgo7TCkox/Sclway/xrZwutfBVuwfIylKp X-Received: by 2002:a05:6808:4fcd:b0:450:1179:5f43 with SMTP id 5614622812f47-4502a42f7f5mr6304730b6e.37.1762881922758; Tue, 11 Nov 2025 09:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762881922; cv=none; d=google.com; s=arc-20240605; b=IH3ACJyA7mcEhzp5Xbh/hrM3W0j0Sb6XlWqmpiWeNmwCvAcRiob9f3hFc95d8QdqW5 p2QZQJ02oRwEhNp9Wu9/d0p7vBFP84Hot0468owpU8/kdjQPVPWCGW2ZdTFcOQdsR/LW n4ys0u1KFBhN7xawjentvGo/nTxDljtPkQr1zGDw/BgA5wulKkrkucfy56MVu/iz3AhR MBbK6qTWqFsEMl6QojO6KUvqid/hXrFhqhbQUkPUOhL5czGTQpguL5WGkahBUsYLG34r B8et7fXqzFJCFFc2byFnmh2rejswGFMv6lcu57uci3oOlwcRWKd0tHwS1KoPvDqrtFGH hByw== 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=mnWpKEfm00sCniIeXD80zUjXDJgSfFclNId+iu7XxQc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=dceEPWH9VPSJVbqMRjkNIqutQRMhTsWDERK0j9C1URWnm5nFYsf45ADtIwt+7ofPi6 uU6ydGw0XtxRW2bK7idABx8pG+2dlupBQakQSqEQo5BDlL0aNsbq1qDYMC75J4vCq6Zu 80bGgJAUIW9dgIr00trGRiqSV5QqzTRqy30OT2qm/UKebuR0ni+9G+i+ViK+m2pGQZFv Leg7M1xGw6agahIwI7c5BM6Eqq5xKgETsyRD3SyMyjGUmlUtw78JvgufEXhGCnwPCB3r 9EH1h1wCCr7BHmR8mgpZMAXdiLd5JWux+MroAsrnPYdQflOSxGFvRtFcR0/k5sBAjRKd z85w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=lhttrPsP; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=cMeYoTAg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jZBpgPH8; 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-450029998dbsi5635822b6e.243.2025.11.11.09.25.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Nov 2025 09:25:22 -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=lhttrPsP; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=cMeYoTAg; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jZBpgPH8; 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=mnWpKEfm00sCniIeXD80zUjXDJgSfFclNId+iu7XxQc=; b=lhttrPsPMPeynBhldoxcF6pqpM OMXB5ZUUoWWq1zvb1LFJThtFp1an0vriEBtgK8Rotr9hg1Bb88W8/NAciD/3S4pJvu/KsPl/DJIRU 4GrnUL/U88esopNXvVOy9YyDLTTU66tFMAhNDe+JEd4ikBx63LwxEYXpvt/Q4kCtEWWw=; 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 1vIs7L-0004l5-Ox; Tue, 11 Nov 2025 17:25:19 +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 1vIs7K-0004kx-Mc for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 17:25:18 +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=QobV/EGbnNXt2aZqH5aNMpW9SjFaEiZgSEA8QjJR5iw=; b=cMeYoTAganPrRi/Yx2RsxmhIh9 0vMPuNarR8ZylKe5ypCNyXvezrChlqDSJUUlBbXfn7PauZg5aNSdX4zu1kLn1dhHlr4JOH0ckdPeZ +E4x8oaXw30OZlHINxh/YHTMmka89jHu1oaNkM0geUmnql2GLx2AhDWp1fBMfCpz9Aro=; 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=QobV/EGbnNXt2aZqH5aNMpW9SjFaEiZgSEA8QjJR5iw=; b=jZBpgPH8GKW+BVIdjfS1Yvhzjy 2yYPKZmAgqFZ29Nwwd1NeoOCrXyg77UKnyfM171FOU4RaGije4g10XQPbogxhyKFWpaUi5MmKfXH1 V9ZuCeJo26UeWYLnEValPxnqqlEJ0Twljcv2hv68DKuba0WUhbk2OS6XdwMIapPNnC0w=; 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 1vIs7H-0002kO-UH for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 17:25:16 +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 5ABHP4Av007706 for ; Tue, 11 Nov 2025 18:25:04 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.1/8.18.1/Submit) id 5ABHP47v007705 for openvpn-devel@lists.sourceforge.net; Tue, 11 Nov 2025 18:25:04 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 11 Nov 2025 18:24:57 +0100 Message-ID: <20251111172504.7683-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-1.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: Heiko Hund Newer version of MSVC do not show the error anymore, but I do get, e.g.: test_crypto.c(538, 23): error C2059: syntax error: '}' 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: 1vIs7H-0002kO-UH Subject: [Openvpn-devel] [PATCH v1] msvc: fix struct initialization for v19 compilers 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?1848515674835004186?= X-GMAIL-MSGID: =?utf-8?q?1848515674835004186?= From: Heiko Hund Newer version of MSVC do not show the error anymore, but I do get, e.g.: test_crypto.c(538,23): error C2059: syntax error: '}' with version 19.38.33133 installed on a test system. Change-Id: I13e34119303e056fdb51ff9925f4944171c824f2 Signed-off-by: Heiko Hund Acked-by: Frank Lichtenheld Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1366 --- 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/+/1366 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/src/openvpn/ssl_verify_mbedtls.c b/src/openvpn/ssl_verify_mbedtls.c index 9e2aa19..80ef837 100644 --- a/src/openvpn/ssl_verify_mbedtls.c +++ b/src/openvpn/ssl_verify_mbedtls.c @@ -230,7 +230,7 @@ * headers and footer */ struct buffer pem = alloc_buf_gc(cert->raw.len * 3 + 100, &gc); - struct buffer der = {}; + struct buffer der = { 0 }; buf_set_read(&der, cert->raw.p, cert->raw.len); if (!crypto_pem_encode("CERTIFICATE", &pem, &der, &gc)) diff --git a/tests/unit_tests/openvpn/test_crypto.c b/tests/unit_tests/openvpn/test_crypto.c index 93dfa42..ba386bd 100644 --- a/tests/unit_tests/openvpn/test_crypto.c +++ b/tests/unit_tests/openvpn/test_crypto.c @@ -535,7 +535,7 @@ 0x1d, 0x6f, 0x64, 0x8b, 0xdf, 0x96, 0x59, 0x67, 0x76, 0xaf, 0xdb, 0x63, 0x77, 0xac, 0x43, 0x4c, 0x1c, 0x29, 0x3c, 0xcb, 0x04 }; - uint8_t info[] = {}; + uint8_t info[] = { 0 }; int L = 42; uint8_t okm[42] = { 0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, 0x71, 0x5f, 0x80, diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_tests/openvpn/test_pkcs11.c index 81d2280..44bfa1d 100644 --- a/tests/unit_tests/openvpn/test_pkcs11.c +++ b/tests/unit_tests/openvpn/test_pkcs11.c @@ -411,7 +411,7 @@ test_tls_ctx_use_pkcs11(void **state) { (void)state; - struct tls_root_ctx tls_ctx = {}; + struct tls_root_ctx tls_ctx = { 0 }; uint8_t sha1[HASHSIZE]; for (struct test_cert *c = certs; c->cert; c++) {