From patchwork Thu Dec 17 11:48:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lev Stipakov X-Patchwork-Id: 1555 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 6K2hGDZj3F9nGgAAIUCqbw (envelope-from ) for ; Fri, 18 Dec 2020 03:07:18 -0500 Received: from proxy7.mail.iad3b.rsapps.net ([172.31.255.6]) by director8.mail.ord1d.rsapps.net with LMTP id oANsGDZj3F+qFQAAfY0hYg (envelope-from ) for ; Fri, 18 Dec 2020 03:07:18 -0500 Received: from smtp30.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.iad3b.rsapps.net with LMTPS id 2K7uETZj3F9iewAAQkQ5tQ (envelope-from ) for ; Fri, 18 Dec 2020 03:07:18 -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: smtp30.gate.iad3b.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: 0b7d3444-4108-11eb-87f6-525400502618-1-1 Received: from [216.105.38.7] ([216.105.38.7:60930] helo=lists.sourceforge.net) by smtp30.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0C/B6-12200-5336CDF5; Fri, 18 Dec 2020 03:07:18 -0500 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.90_1) (envelope-from ) id 1kqAmN-0002n4-Ki; Fri, 18 Dec 2020 08:06:23 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqAmL-0002mo-SH for openvpn-devel@lists.sourceforge.net; Fri, 18 Dec 2020 08:06:21 +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=gue5pYCSOvFk2PnnPG6keWYXaKZyk9Em7PckmOeAekc=; b=HpdZJNrYbdNfhc75smqBrehOqR IhJapy/NOCHnNqyciYa52fjp1EsOcVQHimaXL5o4ymV8dNCaZ1uMrlvIEMjs6U1sHA+YOu78HjwIz VEYSDfQLDup2hc37pgrgfVrzDq4cT93R/LT4vFaPwWznDl2U1d0aRtjWfxXuclvfj9m4=; 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=gue5pYCSOvFk2PnnPG6keWYXaKZyk9Em7PckmOeAekc=; b=PSZ1fom1ayV9fcylZmsAap0J6g sorHAS+hrXb1qAH0t/hajWuotuYTFtd5VX6E1IGvOFHWeOZeWnLaEvt0G3bztuzRhVGLEQqb18Sm1 zQxKgfufh6ucy0cnCUlzrYuy2g7AXYWIOV6/d9pQhZtEGg1SzlodNM7DwYhPgar8NpI4=; Received: from mail-wr1-f42.google.com ([209.85.221.42]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kqAmC-0015Rd-1u for openvpn-devel@lists.sourceforge.net; Fri, 18 Dec 2020 08:06:21 +0000 Received: by mail-wr1-f42.google.com with SMTP id d26so1097336wrb.12 for ; Fri, 18 Dec 2020 00:06:11 -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=gue5pYCSOvFk2PnnPG6keWYXaKZyk9Em7PckmOeAekc=; b=aG15QRQ7ss6qNTzn4F5LeaJb8DxVlwGxoaGrYkYBEQQ4PnD8my1WVC4TMXRgsWaLIe NuV/jNWNb7SeTyFO8n/HT/7mGO9rfLhwRxJPUPD7tK6ZhzAORcW5xJdiPWisRqCv5fWk 0c53jKwm2V4HzAVv/ZB3YbI0wUteQmh1M0zDjXru4W8nNq5FKpvJH559xlYO87QRf56W ntUr56rYIiUh0g/2mQSEtNJ+pJ5xM6HaXPQVi5Uuug25al8o169he/27CBM4b45NbUSh tIz8jRS2l+vwiFBX4DSNIS2Y7zFMWelz9c3joaCbEzxdQTQ4f7Ny05jD3smtmIEBThZu izEg== 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=gue5pYCSOvFk2PnnPG6keWYXaKZyk9Em7PckmOeAekc=; b=gvH5B3aB7aR5ptxlQL3PQnW/y3LPH9e0ljDBJVmrB3gWGm80uSfnELPLnD17vjBTke ZnXhskoe1Gd1mKW8BSe7VdYr60JyycafVIgQzJ83JjdQhcdJGU0gcZsqSh9xn8HNhsp3 ZnF90yCEiT9V2h7tE220dsdDUZBC8YSamUZ+tMO4uwzZvrMt4Ci+mpTneEkv8maRNXPQ 8q1mBxisg9KHcRItz8MxrYB81l+E2BQz8l+XirOXIbArtBeliM/kpsJRABlEyXfZfDl0 N3IbY2V+q8LBRhl+liRs1pTgOsA2hcCOXddjXKAjo58GewiwiiU9GEk8ekB+LDz6Q6bn /QBg== X-Gm-Message-State: AOAM532GJI24DU7MgqzVSSfS2Pvn5LhyM6pu9mwFChOvYRVEihAyl5jw fkfzSoPIFDnQu/j5NHs6sQpkbT2wOHBM0w== X-Google-Smtp-Source: ABdhPJyY+4t1K64XEqiDwLCMO2Z1DBPi5smQM2vQ3ROBu1kbOXbyX1G4tTwwT//5v/u3zH0smovMMg== X-Received: by 2002:adf:bb0e:: with SMTP id r14mr2959645wrg.159.1608278765425; Fri, 18 Dec 2020 00:06:05 -0800 (PST) Received: from LAPTOP-4L3N7KFS.localdomain (nat2.panoulu.net. [185.38.2.2]) by smtp.gmail.com with ESMTPSA id m5sm631548wrz.18.2020.12.18.00.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 00:06:04 -0800 (PST) From: Lev Stipakov To: openvpn-devel@lists.sourceforge.net Date: Fri, 18 Dec 2020 00:48:34 +0200 Message-Id: <20201217224834.160-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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.42 listed in list.dnswl.org] 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.42 listed in wl.mailspike.net] 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -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: 1kqAmC-0015Rd-1u Subject: [Openvpn-devel] [PATCH] ssl_common.h: fix "not all control paths return a value" msvc warning 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 Commit cc5a71637 ("Replace key_scan array of static pointers with inline function") has introduced get_key_scan() routine with switch statement which calls ASSERT in certain case. Even though "this should never happen", this code triggers Level 1 warning "not all control paths return a value" in msvc. Fix by adding "return NULL; /* NOTREACHED */"" after ASSERT. Signed-off-by: Lev Stipakov Acked-by: Gert Doering --- src/openvpn/ssl_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openvpn/ssl_common.h b/src/openvpn/ssl_common.h index f435089a..a826e37f 100644 --- a/src/openvpn/ssl_common.h +++ b/src/openvpn/ssl_common.h @@ -596,6 +596,7 @@ get_key_scan(struct tls_multi *multi, int index) return &multi->session[TM_LAME_DUCK].key[KS_LAME_DUCK]; default: ASSERT(false); + return NULL; /* NOTREACHED */ } }