From patchwork Wed Nov 27 21:06:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 935 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.28.255.1]) by backend30.mail.ord1d.rsapps.net with LMTP id OF9oN1uA310fOgAAIUCqbw for ; Thu, 28 Nov 2019 03:07:55 -0500 Received: from proxy9.mail.ord1c.rsapps.net ([172.28.255.1]) by director7.mail.ord1d.rsapps.net with LMTP id aFJUN1uA311oeAAAovjBpQ ; Thu, 28 Nov 2019 03:07:55 -0500 Received: from smtp26.gate.ord1c ([172.28.255.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy9.mail.ord1c.rsapps.net with LMTP id iHkcN1uA3133aAAAgxtkuw ; Thu, 28 Nov 2019 03:07:55 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp26.gate.ord1c.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: 2e77eade-11b6-11ea-85a0-b8ca3a5bd12c-1-1 Received: from [216.105.38.7] ([216.105.38.7:46766] helo=lists.sourceforge.net) by smtp26.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 13/5A-18213-B508FDD5; Thu, 28 Nov 2019 03:07:55 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iaEpB-0003ir-27; Thu, 28 Nov 2019 08:06:53 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iaEpA-0003ik-4a for openvpn-devel@lists.sourceforge.net; Thu, 28 Nov 2019 08:06:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=NOItIXkZHCjDgZjLV3WZJ6Z9ay8DV285Pvy4WuPDLx8=; b=hISturznDHwxvZ+PPtMIifRt+2 LebB+z0afHMWL45vpGYLjA+DQoq4CTu/LjneT1ro16B3SP62gP+jc30nZp9FGjpIFPLsLN7nJFGD0 aUyfyO3OqwTHW37boYJCxy4F8UNI9bXvwo2SAj3+RjEaPnygRY7ocgpdT0os1+2qjZFU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=NOItIXkZHCjDgZjLV3WZJ6Z9ay8DV285Pvy4WuPDLx8=; b=nSw+ObvckYnUvwUX+B7HP/d+XP M1FjMU9AR/vP+wePgqRkj853E30Dvt8SzLVfTSMMtXAmZ3oU7Dkm8yTUv8qd9W1w9x4qJ9Kum7ja6 ISK9499tGxhRp3ilp0xIHm9YUtek94twekbtAKuCtnj4/rj5W1S2YFyMNIwH0GHBPKbc=; Received: from mail-wm1-f67.google.com ([209.85.128.67]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1iaEp6-00FzvH-Ft for openvpn-devel@lists.sourceforge.net; Thu, 28 Nov 2019 08:06:52 +0000 Received: by mail-wm1-f67.google.com with SMTP id f129so10616158wmf.2 for ; Thu, 28 Nov 2019 00:06:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NOItIXkZHCjDgZjLV3WZJ6Z9ay8DV285Pvy4WuPDLx8=; b=uB7AePGN4kQCgTEVvGFdq2vQx9PT2/l8MjnJKsF57JemqzTMZ/d2LJxpy/Y22e/zkb P3P8D8Xa4OoS6AKzmjZChF3gVfP7zmlB+cHfp0NGgH8/grTLVRyclMKDDrV2BtdkZfHw Xh5a0ahLhqBAXWqWC/vJ9IT4az00nRGdbkdjoQw0HO/kjjeh+TCKH5pKW+8EboiFydmZ 8Zd60YWkxVSzrl8patcceBzQbiL9d/T5TuCajmv0B9nXJlaAvi9UjrVAg8lHBdKhDoRb wWYTQg1QMd6nUIKoiUelgwI679gSxio+/r1el5gMVhi04PLtmjDuI4VXabpsXdwUVAzQ D5dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NOItIXkZHCjDgZjLV3WZJ6Z9ay8DV285Pvy4WuPDLx8=; b=l9gZ9q9CiyGWGssXSegr3j8vn/+PQsyS7ew7SE+XbxFExRaxgAoOnJrC1HxDJEh8L6 w1vro8t/pMcHte1ZZd1K3tNqNMnGM6x+hXwRLxjFduxZyqtoie1zPgloW+KiXjX56UOK uviS3G8o1ILyhQO6JosFz9NtpVQk6NH0MyQnwiyKQzLIHIjESWaOH6f9u3EnHNPF8yUG bguJwbRn9lM8DFBmOaqPXe5qmkUstbJHP3ATM3BwajMZrHjIg+5JjK4S5SfALfN8zM2u sb4oOADr2XAziTrkv0XYLWWyJd66PBSALjfBvRG956O73+jikgztMk3yZgz/amhEVyU7 tMLw== X-Gm-Message-State: APjAAAWd1Tw6g+wNPOyx9riEyry3q9UiCzWkaq6dhRT7a1p2wNiNK7wT 7FaWeqDAXZ2ODxGOn1iuWSJVxHj5N9E= X-Google-Smtp-Source: APXvYqxZdfTNYHUEy76x3gIoAj+j9hSXixqrwMryQvDJqbEgj3HOluNLxuRu0+pCUm1LY7QBzRxTjQ== X-Received: by 2002:a7b:ca57:: with SMTP id m23mr8068548wml.65.1574928401382; Thu, 28 Nov 2019 00:06:41 -0800 (PST) Received: from LAPTOP-4L3N7KFS.panoulu.local ([2a00:1d50:3:0:123:e072:8fa4:4f76]) by smtp.gmail.com with ESMTPSA id i71sm24632972wri.68.2019.11.28.00.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 00:06:40 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Thu, 28 Nov 2019 10:06:31 +0200 Message-Id: <20191128080631.117-1-lstipakov@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.67 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1iaEp6-00FzvH-Ft Subject: [Openvpn-devel] [PATCH] fix clang warning about missing braces 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: , Cc: Lev Stipakov MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Lev Stipakov A struct with subobjects should be initialized with double braces. Signed-off-by: Lev Stipakov --- src/openvpn/crypto.c | 2 +- src/openvpn/crypto_mbedtls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index 65e789ed..731f5bad 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -1857,7 +1857,7 @@ void write_pem_key_file(const char *filename, const char *pem_name) { struct gc_arena gc = gc_new(); - struct key server_key = { 0 }; + struct key server_key = {{ 0 }}; struct buffer server_key_buf = clear_buf(); struct buffer server_key_pem = clear_buf(); diff --git a/src/openvpn/crypto_mbedtls.c b/src/openvpn/crypto_mbedtls.c index 3e77fa9e..57ad85ad 100644 --- a/src/openvpn/crypto_mbedtls.c +++ b/src/openvpn/crypto_mbedtls.c @@ -304,7 +304,7 @@ mbedtls_ctr_drbg_context * rand_ctx_get(void) { static mbedtls_entropy_context ec = {0}; - static mbedtls_ctr_drbg_context cd_ctx = {0}; + static mbedtls_ctr_drbg_context cd_ctx = {{0}}; static bool rand_initialised = false; if (!rand_initialised)