From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.6 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5C56E1F4C3; Sat, 2 Nov 2019 10:40:21 +0000 (UTC) From: Eric Wong To: mwrap-perl@80x24.org Cc: Eric Wong Subject: [PATCH 2/4] workaround -DNDEBUG warnings Date: Sat, 2 Nov 2019 10:40:18 +0000 Message-Id: <20191102104020.30317-3-user@example.com> In-Reply-To: <20191102104020.30317-1-user@example.com> References: <20191102104020.30317-1-user@example.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: From: Eric Wong Perl defaults to building with -DNDEBUG, which causes unused variable warnings to show up when we use -Wall in CCFLAGS. --- Mwrap.xs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mwrap.xs b/Mwrap.xs index b81dfc0..8ce7b46 100644 --- a/Mwrap.xs +++ b/Mwrap.xs @@ -133,6 +133,9 @@ mutex_lock(pthread_mutex_t *m) { int err = pthread_mutex_lock(m); assert(err == 0); +#ifdef NDEBUG + (void)err; /* quiet gcc warning */ +#endif } static void @@ -140,6 +143,9 @@ mutex_unlock(pthread_mutex_t *m) { int err = pthread_mutex_unlock(m); assert(err == 0); +#ifdef NDEBUG + (void)err; /* quiet gcc warning */ +#endif } #ifndef HAVE_MEMPCPY