From patchwork Fri Apr 24 15:12:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11508077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D30721575 for ; Fri, 24 Apr 2020 15:12:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCC912075A for ; Fri, 24 Apr 2020 15:12:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Kc+Ld1Cq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727070AbgDXPMn (ORCPT ); Fri, 24 Apr 2020 11:12:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726849AbgDXPMm (ORCPT ); Fri, 24 Apr 2020 11:12:42 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4DAC09B045 for ; Fri, 24 Apr 2020 08:12:42 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id z1so3245825pfn.3 for ; Fri, 24 Apr 2020 08:12:42 -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=AsKvaFxShVvtV19V1GAHBkKbRAndfAUKlC3PVY8PwaM=; b=Kc+Ld1CqCdb7+tPsya1d9dKSkMJZGNPBU05vfvkPjTCqivWFfDZyE1J3Ea8ZQuIAZy XO2GG3YsV2Ushe1Ik2dtnDna2vGhvItGzOo2q2qdOG8ckYvUvBR6JlPVhYumqv7j+JI3 sH+DpWc7YlfbfEVm6Ax9rVn0poh5KRJU3S0kK/RTSwlSMMfSv/xpidnVVHnXBL1yKoJT HYg+LLlGAPQHphqAUVXm+OckfU54qAFnx9qC9iavYjFt14xRd+WXcNH8HCEFJSo3Xj1d 81VOGd8uQWpOHrvrO9dnAWVlQAD8xwN71M1ywwJ9q/2pPypGMKUlTJjnDk9BbZXUnx75 4MIQ== 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=AsKvaFxShVvtV19V1GAHBkKbRAndfAUKlC3PVY8PwaM=; b=TJlMjoovGUdb8ZinimHk59yDetOoEkm+2tlQ+Aix/TrITYFCKVFDXWzq2AZPTMtJpe WSCGNwSiwZ+eqPrzl9abS1rlya5pn2TOxJZI/pyTHlRpVa06ZlKcZDub2EsG97Mx4kE7 LvczeFaGH3SVTLH14ealI7+S3M6Ssnm3yJsmGZjzHXY6xrj+iH3Z0ulbgQS6jNSAEcCP K7dx6P3E1XNw7mAb1joMWCemqdWM2hBmlkdODYJdssX+5hAQdakMbf8aTM9dZ76D7PPf JpLQ6LIFO5+naV0DFS1+DfhyLrihxKRjVfvD7pIDVmEstLmxCP5YQLO1V/MHk3O6N32t nCmw== X-Gm-Message-State: AGi0PuaLCjdbbj1DCKaJPq8+tsX6ptLh3/bDHRHqSUIaZh3IHhGKy911 QsWoj2iGqmVqDiGEXMXh+IP8PiM7 X-Google-Smtp-Source: APiQypKqZ+dyQtUqRnSFhZGnCgaSpdp2n9SpKA40dmO6WUasLS2zLTVrbKVmH+a4OCex8USmjUBXEQ== X-Received: by 2002:aa7:97a6:: with SMTP id d6mr10012799pfq.92.1587741161429; Fri, 24 Apr 2020 08:12:41 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6374:f359:1ce8:a621:5f80:1116]) by smtp.gmail.com with ESMTPSA id f99sm5078429pjg.22.2020.04.24.08.12.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 08:12:40 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v2 1/4] test-parse-pathspec-file.c: s/0/NULL/ for pointer type Date: Fri, 24 Apr 2020 22:12:30 +0700 Message-Id: X-Mailer: git-send-email 2.26.2.384.g435bf60bd5 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- t/helper/test-parse-pathspec-file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/helper/test-parse-pathspec-file.c b/t/helper/test-parse-pathspec-file.c index 02f4ccfd2a..b3e08cef4b 100644 --- a/t/helper/test-parse-pathspec-file.c +++ b/t/helper/test-parse-pathspec-file.c @@ -6,7 +6,7 @@ int cmd__parse_pathspec_file(int argc, const char **argv) { struct pathspec pathspec; - const char *pathspec_from_file = 0; + const char *pathspec_from_file = NULL; int pathspec_file_nul = 0, i; static const char *const usage[] = { @@ -20,9 +20,9 @@ int cmd__parse_pathspec_file(int argc, const char **argv) OPT_END() }; - parse_options(argc, argv, 0, options, usage, 0); + parse_options(argc, argv, NULL, options, usage, 0); - parse_pathspec_file(&pathspec, 0, 0, 0, pathspec_from_file, + parse_pathspec_file(&pathspec, 0, 0, NULL, pathspec_from_file, pathspec_file_nul); for (i = 0; i < pathspec.nr; i++) From patchwork Fri Apr 24 15:12:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11508079 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1365092C for ; Fri, 24 Apr 2020 15:12:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC90B2075A for ; Fri, 24 Apr 2020 15:12:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KUBFGEih" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727781AbgDXPMp (ORCPT ); Fri, 24 Apr 2020 11:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726849AbgDXPMo (ORCPT ); Fri, 24 Apr 2020 11:12:44 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 977E6C09B045 for ; Fri, 24 Apr 2020 08:12:43 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id g6so4750637pgs.9 for ; Fri, 24 Apr 2020 08:12:43 -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=V+qYI0xvGQsUgtH1FSRhdvvtYWSwfJVxZgXG2a6BvmI=; b=KUBFGEihPH6LnXia/Czr60FLtKgr9QjHpSRIV2y7zREJFVDljFyfRFlwSwf7q8wSzN j5hZ0hY57YrR17UGDlHwh+88d8PnBi4QxpyRqo4OvjHLDUaIvckf6vfzUEmSmpT5Ik5c oFzaK0gZ7X4gFnyzEM9sYxZUTFDEQDCGTjIomDdf8/Y9E+z2EajnAFxiY6Xz4iB/mo8O g8hBkQhyYemt+7OEsXLJBmPbbBHvg8CT5HKSuKHV4FYRw/mMCyBNTwWfNlMLfM/es9Nx P9iJ93/WfBX68/KF5khEFg2ff95lnMj2Dr+Z3SoqSO/YUzONkSH/KKHJhR2zUiDqcDQn FVXw== 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=V+qYI0xvGQsUgtH1FSRhdvvtYWSwfJVxZgXG2a6BvmI=; b=jxCL9tYjAGgttl1Ye1V2u07V0MX3+91YlSC3kPbxn/MhHUz9JWbnKgatvfhA0DBgbU szcpcpKeSjZTLxZuEliGViJOCe2osvpnhv1ppyKVSLteDuKwlrrQkKXVaZOHc9dSak+s MvEh0Nr0+7BwHVR4XWr0vJLlSF9SIbt687hkOcx/CNuD4y8jK9Y+MetpEsuoqgJRaXQx IQcC2F6TtlcygsijL4pdVpNwmMrCe/LR/kjIQTmNZiSVj4DXN/ylNdQyoKiU3VsClFoZ riiq5OahVzc6cnwOPN3glMsUP8hNhkoNxDLDJ52UHIMXFLlY5wzx4pLsrcZQjbBePVl5 kWdg== X-Gm-Message-State: AGi0PuZaJ+XqtVoOqckkYRPshvs7oCTfuWq05z3V24FB/nnsslIojocU gqM7uFnTxhG3Xa7T75GdtdQkwgrF X-Google-Smtp-Source: APiQypJG8kymck2OrAj7AjKjLIV89s0ciBS50N7YpE/zIWPAoN5P1c2aWtTsiYoQENgZ2VnEAAGmCQ== X-Received: by 2002:a62:1dd8:: with SMTP id d207mr10360261pfd.3.1587741162987; Fri, 24 Apr 2020 08:12:42 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6374:f359:1ce8:a621:5f80:1116]) by smtp.gmail.com with ESMTPSA id f99sm5078429pjg.22.2020.04.24.08.12.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 08:12:42 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v2 2/4] compat/regex: include alloca.h before undef it Date: Fri, 24 Apr 2020 22:12:31 +0700 Message-Id: <290ba923b5ee5bcaa4801454b6692deb532bd681.1587740959.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.2.384.g435bf60bd5 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Somewhere later in the code, we indirectly include alloca.h which will define alloca again, thus create a warning about redefinition of a preprocessor. Include it prior to define alloca in order to not define it again. Signed-off-by: Đoàn Trần Công Danh --- compat/regex/regex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/compat/regex/regex.c b/compat/regex/regex.c index f3e03a9eab..4bef75a716 100644 --- a/compat/regex/regex.c +++ b/compat/regex/regex.c @@ -62,6 +62,7 @@ #include #ifdef GAWK +#include #undef alloca #define alloca alloca_is_bad_you_should_never_use_it #endif From patchwork Fri Apr 24 15:12:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11508083 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 384BA92C for ; Fri, 24 Apr 2020 15:12:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2127C20767 for ; Fri, 24 Apr 2020 15:12:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IqMAHNKS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727962AbgDXPMq (ORCPT ); Fri, 24 Apr 2020 11:12:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726849AbgDXPMp (ORCPT ); Fri, 24 Apr 2020 11:12:45 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47768C09B045 for ; Fri, 24 Apr 2020 08:12:45 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id h69so4758193pgc.8 for ; Fri, 24 Apr 2020 08:12:45 -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=6Svij7AqIu1IfO1+ocfAXfydIcw/vut33rQEygmYm5k=; b=IqMAHNKSz495sMWxticW3h66WMug5h027Ly0WnmWD1kr+Fwmuw0wsyW4r8bhGMeVNg bm8jFLouQeN5J8jLHLlAIQgnO4qLO/ysQB7wYIEyMeu5YksCppqVlaEyS9d9vWemkzj8 vhLwXYkqT8RFlij9MpZFFDaVnjDExlZIOpHyd7BMCxspnlwMCrzhIaOXvgULhYUaF1QY yU1QSTc11TPXN9pEAa0rZ+K3o+JH+hKFWE9ADSDy6wQNbXelYcuoM+hyT7SFqT5hv6GG 1EoA+DVGBSv82YeEaWlMsyp8A9KmPFhkHQBnrd8dzqVhC8y1dJr+ywSHc3ivCARlxgIX aYdg== 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=6Svij7AqIu1IfO1+ocfAXfydIcw/vut33rQEygmYm5k=; b=igrjZeRBZvmTM2e8NuEbqy3K0J+7zOlJiKG6+WpwERysj/NPZfsMVlWLz3g7AAN9kU ytWVPrEJ90MG4UIGxTLaAl012aB+QRe+Go83X9t4PDhf0UnVhhlDRyUNhFiXmYtWLlwW dfKFjtU+fcJleMVBRybBt5Qn5Zfuk3b9E5l0Ggv2JGrAeSuK1fMbw//m1xQ/Du1/xbbN f62N9dsBWGeb5K1VK7p/shnvn12O9ASs15crHJ/VeY3r2vQ8zOZRSexGLx0WqffWLlIR KITVSsqFwTRl7XNBbDBcbGYdPH9rR48OE38G9ljyxqtHIpjJFPj30CB4UhDDiBeWPcLi clLQ== X-Gm-Message-State: AGi0PuY4UdvSSwpfjsu/g4A8nJcIYHouU/or6xjJ9Dl9K2N5gIke+cWb fb0Pq79OeTeKRczh8AQHPLyETzPP X-Google-Smtp-Source: APiQypLKkPAdGs7RjH212tN0W5h5ACovcOOLD5n0Q51OYqmsr4r79pGjttZ9EXGXHxho6750kbScyA== X-Received: by 2002:a62:a504:: with SMTP id v4mr3662639pfm.117.1587741164640; Fri, 24 Apr 2020 08:12:44 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6374:f359:1ce8:a621:5f80:1116]) by smtp.gmail.com with ESMTPSA id f99sm5078429pjg.22.2020.04.24.08.12.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 08:12:44 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v2 3/4] graph.c: limit linkage of internal variable Date: Fri, 24 Apr 2020 22:12:32 +0700 Message-Id: <39f8d85c2f16081415741351c16fb34d74924d3c.1587740959.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.2.384.g435bf60bd5 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- graph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graph.c b/graph.c index 4fb25ad464..4cd9915075 100644 --- a/graph.c +++ b/graph.c @@ -1055,7 +1055,7 @@ static void graph_output_commit_line(struct git_graph *graph, struct graph_line graph_update_state(graph, GRAPH_COLLAPSING); } -const char merge_chars[] = {'/', '|', '\\'}; +static const char merge_chars[] = {'/', '|', '\\'}; static void graph_output_post_merge_line(struct git_graph *graph, struct graph_line *line) { From patchwork Fri Apr 24 15:12:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= X-Patchwork-Id: 11508085 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C3531575 for ; Fri, 24 Apr 2020 15:12:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0599920767 for ; Fri, 24 Apr 2020 15:12:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Acjn2iJe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728019AbgDXPMs (ORCPT ); Fri, 24 Apr 2020 11:12:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726849AbgDXPMq (ORCPT ); Fri, 24 Apr 2020 11:12:46 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E057DC09B045 for ; Fri, 24 Apr 2020 08:12:46 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id o185so4772371pgo.3 for ; Fri, 24 Apr 2020 08:12:46 -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=tcH94ZFcCTHG09/dto/Vv8Bt0IloAwuj36FNn2js+xU=; b=Acjn2iJe14x0Y2AxGxzbOYI0e5XhOkhyomtQgu2M79WsI1gEn1/GyXa/e/tUx8/q1d /Vn0GVFDquH7uEQWLpSeC/ic7XVu80JQsrTTv86/i/SrVQUGhOEvOkMC7TJ2j+/d9bNZ twE/CbixOynExJd791yW1JtLsMTvyYB3X7SUPls1lKB5GyVPlD9EKH+8Wypjt/NcQwB7 ozKc9c5uWw9k5NqvPomkf7nOF7h5/7deOcNLEPMILsTOD6nrEQ8eukhLxbMlLAMbLrEW 2IxXfNWnefE9fxf2/N0TlQlzIepX7Zc9F/8s6HCYD4vFppW6uUzLHtSoiLzhL/YoBOy4 eemg== 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=tcH94ZFcCTHG09/dto/Vv8Bt0IloAwuj36FNn2js+xU=; b=mfSmNOpEmeztAhSATl3miomNE12po5mAjj1I6/U0XyTMlf0rG3q341OwVdaUJqVBwl nLXM7IL6FxugL7eoPH4ap9MM16zCYISlHIljKiBARzuiNJUMRL8HCYxmZiqIDdIq19tX dgZk4BVqdaXoJlziNRa7iaXOjPVg0Ew8sSAcLwGfS9Qz9NaKL2Ts5wy5ADX8bVn81c37 HWIzBUV791tnjk6Dt+Fa7NFV86RlVz3gPIHYzb4I9iglL9QUTn84d8tLjYhZr/HPAOwW tc0bkeRJwD6EhiWBpU3byORAO5WpDscC9DV6APpI0btie7P8bZaKlyfpytTaMhKtGS3q JfaA== X-Gm-Message-State: AGi0PuYmw20rocJaWvpmfbKpkVWlXHDhR8ySZJC2ZvZnUC0Oz07MiLb1 IfMR9oRDRZ7nsze5V42xy+1O96tr X-Google-Smtp-Source: APiQypLdvY4frZMMQ6TzPzZvBi/ymeYBTcHEn44Gf8Nc9NvfrHlN0obWXXhQsA1Ax5IGsMtJQHXfpQ== X-Received: by 2002:a63:d13:: with SMTP id c19mr9372464pgl.180.1587741166269; Fri, 24 Apr 2020 08:12:46 -0700 (PDT) Received: from localhost.localdomain ([2402:800:6374:f359:1ce8:a621:5f80:1116]) by smtp.gmail.com with ESMTPSA id f99sm5078429pjg.22.2020.04.24.08.12.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2020 08:12:45 -0700 (PDT) From: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= To: git@vger.kernel.org Cc: =?utf-8?b?xJBvw6BuIFRy4bqnbiBDw7RuZyBEYW5o?= Subject: [PATCH v2 4/4] progress.c: silence cgcc suggestion about internal linkage Date: Fri, 24 Apr 2020 22:12:33 +0700 Message-Id: <41eecf18edf3772ba04aebd656018e36058182d6.1587740959.git.congdanhqx@gmail.com> X-Mailer: git-send-email 2.26.2.384.g435bf60bd5 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Đoàn Trần Công Danh --- progress.c | 2 +- progress.h | 8 ++++++++ t/helper/test-progress.c | 9 +-------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/progress.c b/progress.c index 19805ac646..75633e9c5e 100644 --- a/progress.c +++ b/progress.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#define GIT_TEST_PROGRESS_ONLY #include "cache.h" #include "gettext.h" #include "progress.h" @@ -52,7 +53,6 @@ static volatile sig_atomic_t progress_update; */ int progress_testing; uint64_t progress_test_ns = 0; -void progress_test_force_update(void); /* To silence -Wmissing-prototypes */ void progress_test_force_update(void) { progress_update = 1; diff --git a/progress.h b/progress.h index 847338911f..f1913acf73 100644 --- a/progress.h +++ b/progress.h @@ -3,6 +3,14 @@ struct progress; +#ifdef GIT_TEST_PROGRESS_ONLY + +extern int progress_testing; +extern uint64_t progress_test_ns; +void progress_test_force_update(void); + +#endif + void display_throughput(struct progress *progress, uint64_t total); void display_progress(struct progress *progress, uint64_t n); struct progress *start_progress(const char *title, uint64_t total); diff --git a/t/helper/test-progress.c b/t/helper/test-progress.c index 42b96cb103..5d05cbe789 100644 --- a/t/helper/test-progress.c +++ b/t/helper/test-progress.c @@ -13,20 +13,13 @@ * * See 't0500-progress-display.sh' for examples. */ +#define GIT_TEST_PROGRESS_ONLY #include "test-tool.h" #include "gettext.h" #include "parse-options.h" #include "progress.h" #include "strbuf.h" -/* - * These are defined in 'progress.c', but are not exposed in 'progress.h', - * because they are exclusively for testing. - */ -extern int progress_testing; -extern uint64_t progress_test_ns; -void progress_test_force_update(void); - int cmd__progress(int argc, const char **argv) { int total = 0;