From patchwork Thu Oct 25 11:04:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 10655707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9847F14E2 for ; Thu, 25 Oct 2018 11:05:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 878192B6C3 for ; Thu, 25 Oct 2018 11:05:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79E082B6CD; Thu, 25 Oct 2018 11:05:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 890262B6C3 for ; Thu, 25 Oct 2018 11:05:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeJYThY (ORCPT ); Thu, 25 Oct 2018 15:37:24 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42030 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727206AbeJYThX (ORCPT ); Thu, 25 Oct 2018 15:37:23 -0400 Received: by mail-pl1-f196.google.com with SMTP id t6-v6so3649572plo.9 for ; Thu, 25 Oct 2018 04:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TOdCWqNpxYFrjM+KrqrRbVpTskwxUHd5G9MwRSbZiBI=; b=TpF4QUeucHDXCNa2zWbgPWUnkoj9S0+DqlpkKhuxwBW3fiXmsnC6r26BX5ULjToMEV iwNRwIqmJUBsAHb/6jDKZZ+QZOsifFYl1tibVrXD1VGAVEj532qL6XWcFVI2m+DHbiGT A7EQTNmZamKoh6DQQsXdgl71PRLHiDPwrvRX39VZSihlFg2+74nnep5BjX03RdnKf6LQ 1ViRcvE2yHLU4cuLYiszynPST9G9lq9RSAnWe8CHSymW218FmIDaw0M0UQp/ZLhOKVgW uW2eC++3ikC7wf/cgBmbI8MK66fLkmslzOrxNR0wtysddIBkvGGYb7ChaC3abpVgkHxD YmNA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TOdCWqNpxYFrjM+KrqrRbVpTskwxUHd5G9MwRSbZiBI=; b=h3zyOFylkeX6A/QTXkZJfGkOHQ8Q1NYrukSdwyqNi9Ef4eqdfWFJriw/E2/VvjzzDu x8zLphgbCIZMzSrRuilkXz+LZEqFx2IkJjsNK/vQHu9QF2W1fo3ltl82HYyDXgLNQ3Pr SgcDy2A+XDJvFshoAr2K5dx1Qn1rntYfOSr+Fh6ULgGyzn8R6kvzh+SUu3v2ovSPwb3s GHFJknGuMIYEwpNTXwVXrBX4fhLI8RamqULbRhk8zAeS0ygsrYqJmvMjfoSBgwuYhGFb OFF8fDfa3ju7pWn9f8No0T75v7tlt2svfURt7bofQw+0nxy/K66fUfFh2DxGy90x/T9K tw8g== X-Gm-Message-State: AGRZ1gKIvhGbFw4w0zqvJcOONnr4+OsULf3Wp5fOSp+5Oxht3LQGOh0K HjuYJR+EutSmQRzwrdnLw5Z+04GwMtw= X-Google-Smtp-Source: AJdET5eQmu4bIdmzsSfUKj/enQVuAR0lrmvyu6Aa0aYQXm6AVgyojw472y3Y/WLfIpoTgSFWEFAUSw== X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr1096408plk.64.1540465507248; Thu, 25 Oct 2018 04:05:07 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id 74-v6sm17545405pfx.182.2018.10.25.04.05.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Oct 2018 04:05:06 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: pclouds@gmail.com, peff@peff.net, chriscool@tuxfamily.org, l.s.r@web.de, ramsay@ramsayjones.plus.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= , Junio C Hamano Subject: [PATCH v3 1/3] commit-slab: move MAYBE_UNUSED into git-compat-util Date: Thu, 25 Oct 2018 04:04:25 -0700 Message-Id: <20181025110427.13655-2-carenas@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181025110427.13655-1-carenas@gmail.com> References: <20181025110427.13655-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP after 36da893114 ("config.mak.dev: enable -Wunused-function", 2018-10-18) it is expected to be used to prevent -Wunused-function warnings for code that was macro generated Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- commit-slab-impl.h | 4 +--- git-compat-util.h | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commit-slab-impl.h b/commit-slab-impl.h index ac1e6d409a..e352c2f8c1 100644 --- a/commit-slab-impl.h +++ b/commit-slab-impl.h @@ -1,10 +1,8 @@ #ifndef COMMIT_SLAB_IMPL_H #define COMMIT_SLAB_IMPL_H -#define MAYBE_UNUSED __attribute__((__unused__)) - #define implement_static_commit_slab(slabname, elemtype) \ - implement_commit_slab(slabname, elemtype, static MAYBE_UNUSED) + implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static) #define implement_shared_commit_slab(slabname, elemtype) \ implement_commit_slab(slabname, elemtype, ) diff --git a/git-compat-util.h b/git-compat-util.h index 48c955541e..8121b73b4a 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -408,6 +408,8 @@ static inline char *git_find_last_dir_sep(const char *path) #define LAST_ARG_MUST_BE_NULL #endif +#define MAYBE_UNUSED __attribute__((__unused__)) + #include "compat/bswap.h" #include "wildmatch.h" From patchwork Thu Oct 25 11:04:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 10655709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C072D109C for ; Thu, 25 Oct 2018 11:05:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF4242B6C3 for ; Thu, 25 Oct 2018 11:05:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2EC32B6CD; Thu, 25 Oct 2018 11:05:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B78CD2B6C3 for ; Thu, 25 Oct 2018 11:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727423AbeJYTh3 (ORCPT ); Thu, 25 Oct 2018 15:37:29 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42037 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbeJYTh2 (ORCPT ); Thu, 25 Oct 2018 15:37:28 -0400 Received: by mail-pl1-f194.google.com with SMTP id t6-v6so3649666plo.9 for ; Thu, 25 Oct 2018 04:05:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t4NzXWwR8Caddhtr8/H7jijAPXDoy4qtgq3g303mE+Y=; b=HRKU7jvnwOkrsi50Ciaj//pGOFR4mJuwiVKzLlzeMRSBA0THajKzRVCHjweQSGpSvG moucyzB3UR7mFR1o8aNr3ZWYJAizyCxxlY3jN3SoYDfbfcUn7S5QfWEEkYEdbkMx+It1 IaxboX1xOox0EzpGjfXBcC0yN1Bfur3sAR4tvIi+IOfAG4tAhqeL/3Fc3uOAHk+lJDN6 j5SY0BpEXYrUw1KIQ2IE5WJxPoAj8VTf8mFkwiO4GhwAATWbtxOyKfjx61AF/bMXOZ6/ K8M8KCEfapTZnOjTpQ0RAfZWL3ers/akEGvJOQbWNx0oQQGOdR9VmHzPVMD4xFVxOIs0 ANPw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=t4NzXWwR8Caddhtr8/H7jijAPXDoy4qtgq3g303mE+Y=; b=oWuXfgOwhtke7sJ4FN4KaixMWLWfb129eOWBobDEzlXGWrAKWujPoR02pn28ege7yr JrBdQDv4v6S0+JZxKJlobW1qRK0aU06kLpFNch6SSFUE6aBs97RdgdVRR38aWpzHFd48 eI+oI6FYQCxrXCSMn1TWCdKTxT9pJP4ekqLMXtuFnqZT63G4P2OhCwg9Edc6Ak+HIOGK ZmifMg+aKhCcA6vslQ6GGGr3CUh1ichWdiwSCceu9Wk5er+ht+cdzgM8gfsfD++AyVH0 kOkofgDQtH74So8uEPeiKiX2k7OiMJvlzycxrPlRVA1KmrFTBluH6zGbgWLinGvnim9K tbFQ== X-Gm-Message-State: AGRZ1gJUDmzKS6E6QTY5p+o8WE4EZbC4c70K06Bl1xKY+Runqqht3n4d OooLhWkDHZJfG4Wt5dhBtrzIg2lFkes= X-Google-Smtp-Source: AJdET5eeQ94/TbLir9RSHq4fudMXVZ81WYZq+jokYwkOuaTfCnKZHNttYe17t/Kcd+fWHTm/Y0fqBQ== X-Received: by 2002:a17:902:20c5:: with SMTP id v5-v6mr1080689plg.62.1540465511632; Thu, 25 Oct 2018 04:05:11 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id 74-v6sm17545405pfx.182.2018.10.25.04.05.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Oct 2018 04:05:11 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: pclouds@gmail.com, peff@peff.net, chriscool@tuxfamily.org, l.s.r@web.de, ramsay@ramsayjones.plus.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= , Junio C Hamano Subject: [PATCH v3 2/3] khash: silence -Wunused-function in delta-islands from khash Date: Thu, 25 Oct 2018 04:04:26 -0700 Message-Id: <20181025110427.13655-3-carenas@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181025110427.13655-1-carenas@gmail.com> References: <20181025110427.13655-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP showing the following when compiled with latest clang (OpenBSD, Fedora and macOS): delta-islands.c:23:1: warning: unused function 'kh_destroy_str' [-Wunused-function] delta-islands.c:23:1: warning: unused function 'kh_clear_str' [-Wunused-function] delta-islands.c:23:1: warning: unused function 'kh_del_str' [-Wunused-function] Reported-by: René Scharfe Suggested-by: Nguyễn Thái Ngọc Duy Signed-off-by: Carlo Marcelo Arenas Belón Signed-off-by: Junio C Hamano --- khash.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/khash.h b/khash.h index d10caa0c35..532109c87f 100644 --- a/khash.h +++ b/khash.h @@ -234,7 +234,7 @@ static const double __ac_HASH_UPPER = 0.77; __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) #define KHASH_INIT(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \ - KHASH_INIT2(name, static inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) + KHASH_INIT2(name, MAYBE_UNUSED static inline, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) /* Other convenient macros... */ From patchwork Thu Oct 25 11:04:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 10655711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6DE5109C for ; Thu, 25 Oct 2018 11:05:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C60992B6C3 for ; Thu, 25 Oct 2018 11:05:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA09C2B6CD; Thu, 25 Oct 2018 11:05:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D58D2B6C3 for ; Thu, 25 Oct 2018 11:05:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727430AbeJYThc (ORCPT ); Thu, 25 Oct 2018 15:37:32 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44570 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727333AbeJYThb (ORCPT ); Thu, 25 Oct 2018 15:37:31 -0400 Received: by mail-pg1-f194.google.com with SMTP id w3-v6so3807743pgs.11 for ; Thu, 25 Oct 2018 04:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MqHiMKV4Y0VL94TNgYJ6g/lC/1cs4jQWpZ6F4/47otI=; b=tmJ19RyWcj4eLPwfyO2PVqTWCH5vXrPazbK3Y5P181aRtIMzFVQ0rW12ZSF/M1uwNV K35MY+soAGoO6+AxEhnxD30OvwGQIcQOLAizYQB4C1zGKKGPFCmxoMVTKrmAsr+FijIJ q4wA9P5jsnacFwgT7xjVK1Ebl1xeYECRs7Rr4DHyYRbL2py/fwU0+79PcmISDJRGIoAj TaTo0oH53xSrOlrOCTO0a4llNGxTpY9+KL7cUOONlSljWETppLT83Nvz/ext+XeTO/KH qeRvUSzCr3bRlXu8L8VJy0wGSNrmtf2i+1rD52gn6+rVQlrRkfUpkKsJFuFiMZIvPyZk bIaw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=MqHiMKV4Y0VL94TNgYJ6g/lC/1cs4jQWpZ6F4/47otI=; b=HPx3y56IzYWGOMRs/7Wv/iTbtwrGkr0nrSYanxFUu5dobaRE1WccTxnTD79wWUBfuP vrxAtmnQsH2RWZtFT9FCs1Obp4Y2fIOblSKGNAnXWnCXPyrDBQZ6PLEaDEwOMRlryiO+ 0eFolNC28xnBg26iNRjmHptux2mGZaTFqbiEl7R8ES0NOAHsenS+PMPvENh1XB+LESRv dT9mWJKHBMywkcaayA3N90sd8ov8q4eiqndl+rJyND5bGfNeY02+e3zEnu8GhXIw7iOL NqNqFo+F5/efxQ+zz5FRI/GXPShTq7oBQHU27Lrb6Nsnqe8Y7HzEuWoJoEyLriI0K/hm qQOg== X-Gm-Message-State: AGRZ1gIj3TilmbnuLUsA5Ahn7otNXcSLW/Uqb0TqqsJQN6CpS1vUxYVi CPrfIJOPZ8YWGxfiASYVOGPyS4zeAmg= X-Google-Smtp-Source: AJdET5cSuEjlL7FyCwDVENKubuJqQzo7iT6ItimUb58zCxYN2hZB0G0Sh8J7FZej9G8PJjaAZdj5nw== X-Received: by 2002:a63:d34f:: with SMTP id u15-v6mr1016554pgi.325.1540465514955; Thu, 25 Oct 2018 04:05:14 -0700 (PDT) Received: from localhost.localdomain (c-67-188-192-166.hsd1.ca.comcast.net. [67.188.192.166]) by smtp.gmail.com with ESMTPSA id 74-v6sm17545405pfx.182.2018.10.25.04.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Oct 2018 04:05:14 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: pclouds@gmail.com, peff@peff.net, chriscool@tuxfamily.org, l.s.r@web.de, ramsay@ramsayjones.plus.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= Subject: [PATCH v3 3/3] commit-slab: missing definitions and forward declarations (hdr-check) Date: Thu, 25 Oct 2018 04:04:27 -0700 Message-Id: <20181025110427.13655-4-carenas@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181025110427.13655-1-carenas@gmail.com> References: <20181025110427.13655-1-carenas@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP struct commmit needs to be defined before commit-slab can generate working code, object_id should be at least known through a forward declaration Signed-off-by: Carlo Marcelo Arenas Belón --- commit-slab-impl.h | 2 ++ commit-slab.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/commit-slab-impl.h b/commit-slab-impl.h index e352c2f8c1..db7cf3f19b 100644 --- a/commit-slab-impl.h +++ b/commit-slab-impl.h @@ -1,6 +1,8 @@ #ifndef COMMIT_SLAB_IMPL_H #define COMMIT_SLAB_IMPL_H +#include "commit.h" + #define implement_static_commit_slab(slabname, elemtype) \ implement_commit_slab(slabname, elemtype, MAYBE_UNUSED static) diff --git a/commit-slab.h b/commit-slab.h index 69bf0c807c..722252de61 100644 --- a/commit-slab.h +++ b/commit-slab.h @@ -1,6 +1,8 @@ #ifndef COMMIT_SLAB_H #define COMMIT_SLAB_H +struct object_id; + #include "commit-slab-decl.h" #include "commit-slab-impl.h"