From patchwork Thu Jul 11 22:03:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 11040803 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 8A57313A4 for ; Thu, 11 Jul 2019 22:03:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 775C528B20 for ; Thu, 11 Jul 2019 22:03:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66CB428B24; Thu, 11 Jul 2019 22:03:08 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 9840028B20 for ; Thu, 11 Jul 2019 22:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728651AbfGKWDG (ORCPT ); Thu, 11 Jul 2019 18:03:06 -0400 Received: from avasout04.plus.net ([212.159.14.19]:60988 "EHLO avasout04.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfGKWDG (ORCPT ); Thu, 11 Jul 2019 18:03:06 -0400 Received: from [10.0.2.15] ([146.90.155.229]) by smtp with ESMTPA id lh9chvtftaslVlh9dhxNPf; Thu, 11 Jul 2019 23:03:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=plus.com; s=042019; t=1562882585; bh=fw3pxj9YX1OR3nDxB92Q/iEFtIM/zy1NGy3dqBtxh8Y=; h=From:To:Cc:Subject:Date; b=HHwi8Y3QNTLBtKbvFNAiVzcC89CuAS2pldKEMU9/LpkQKiYnxR6ifY4T4nwhmr17j C998lZtT0dF5T0hqTIVuy/RwprWH+U4wFm3DXEmI/2U55Z1DAdkuT3Fp93eboDQS1V gdHI9KQbUXgeYnfrJhtXQ1YMhfjStjccXQRyvFyWqaKw2WKvQiDUWk3YPgKtfIzOP+ 8wedpoO6m6YaqupkPyIsHDa123TWttvj+PFAjgW/2nmEZX9l9qoXB1Om+u6TCtDrvm UN/gq0wtnh/iv0en+imeNcGeoIdhin8Mj9JEKui2Fxm33MeRdNNRpCFaUkxlo4g09M dObE0W9B8kmkA== X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=bfsVr9HB c=1 sm=1 tr=0 a=vIuMZWos35SQ56IFzOfLHA==:117 a=vIuMZWos35SQ56IFzOfLHA==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=8m-p5IFQrjB3aJAUfiYA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 From: Ramsay Jones To: Thomas Gummerer Cc: Junio C Hamano , GIT Mailing-list Subject: [PATCH] range-diff: fix some 'hdr-check' and sparse warnings Message-ID: Date: Thu, 11 Jul 2019 23:03:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfF2cDcv72Aseb9w+nhsHV00aKL640TufDkbD+QbqDECIcKDQShEXNWdVGEdhj39emOTc0FAXHwVpswhZQPpiUyNuNH9TkCgEGRCA2cmFbToY50kGIr7p +9n5VciNoGy784urUT5e2kFYfKxYQ3REQS+J+CdcPeNaH0pNbZ4R+s2IyqpF/HZfRP0D/MhrC7a3xA== Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ramsay Jones --- Hi Thomas, If you need to re-roll your 'tg/range-diff-output-update' branch, could you please squash (parts) of this into the relevant patches. The first hunk fixes a couple of 'hdr-check' warnings: $ diff nhcout phcout | head 4a5,13 > apply.h:146:22: error: ‘GIT_MAX_HEXSZ’ undeclared here (not in a function); did you mean ‘NI_MAXHOST’? > char old_oid_prefix[GIT_MAX_HEXSZ + 1]; > ^~~~~~~~~~~~~ > NI_MAXHOST > apply.h:151:19: error: array type has incomplete element type ‘struct object_id’ > struct object_id threeway_stage[3]; > ^~~~~~~~~~~~~~ > Makefile:2775: recipe for target 'apply.hco' failed > make: *** [apply.hco] Error 1 $ and needs to be applied to commit b9f62a7e24 ("apply: make parse_git_header public", 2019-07-08). The second hunk fixes a sparse 'Using plain integer as NULL pointer' warning, and needs to be applied to commit 04539fc67b ("range-diff: add section header instead of diff header", 2019-07-08). Thanks! ATB, Ramsay Jones apply.h | 1 + range-diff.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apply.h b/apply.h index ade50f66c5..c8c9287cb2 100644 --- a/apply.h +++ b/apply.h @@ -3,6 +3,7 @@ #include "lockfile.h" #include "string-list.h" +#include "hash.h" struct repository; diff --git a/range-diff.c b/range-diff.c index ba1e9a4265..0f24a4ad12 100644 --- a/range-diff.c +++ b/range-diff.c @@ -102,7 +102,7 @@ static int read_patches(const char *range, struct string_list *list) } if (starts_with(line, "diff --git")) { - struct patch patch = { 0 }; + struct patch patch = { NULL }; struct strbuf root = STRBUF_INIT; int linenr = 0;