From patchwork Sat Jan 26 21:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramsay Jones X-Patchwork-Id: 10782599 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 45BF991E for ; Sat, 26 Jan 2019 21:03:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32CDF2CCBC for ; Sat, 26 Jan 2019 21:03:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 246792CCE2; Sat, 26 Jan 2019 21:03:20 +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,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 835CD2CCBC for ; Sat, 26 Jan 2019 21:03:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726373AbfAZVDR (ORCPT ); Sat, 26 Jan 2019 16:03:17 -0500 Received: from avasout05.plus.net ([84.93.230.250]:51666 "EHLO avasout05.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfAZVDR (ORCPT ); Sat, 26 Jan 2019 16:03:17 -0500 Received: from [10.0.2.15] ([146.198.133.33]) by smtp with ESMTPA id nV6fg69JtuQOBnV6ig5n0e; Sat, 26 Jan 2019 21:03:16 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=JtDfUvwC c=1 sm=1 tr=0 a=VCDsReDbrwk4B7AcQzWGLw==:117 a=VCDsReDbrwk4B7AcQzWGLw==:17 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=HwVATwgoNOUDAL2-MZoA:9 a=QEXdDO2ut3YA:10 a=yJM6EZoI5SlJf8ks9Ge_:22 X-AUTH: ramsayjones@:2500 To: Johannes Schindelin Cc: Junio C Hamano , GIT Mailing-list From: Ramsay Jones Subject: [PATCH] test-xml-encode: fix sparse NULL pointer warnings Message-ID: <68a8c70e-dc42-1df3-3616-c096f63cb848@ramsayjones.plus.com> Date: Sat, 26 Jan 2019 21:03:12 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Language: en-GB X-CMAE-Envelope: MS4wfFxgeYJ+KNTzajkM+sPaUEQUo6V4EXJCJy+fBTx4KYkgeeSkSXZfekwI7x6w0D92pfNrfz6EAKmVjk8is6LBHiRT7hynvb8g0akw+3sPZE+PcM4Rn7qp HZRTtjoyNiKI+7hNmBI/c9W7Ip6LsGM8mg3EQnTNmgHtpRf+5kA3MywoW6FI+FHp7yO01kmH0e1ErA== 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 Johannes, If you need to re-roll your 'js/vsts-ci' branch, could you please squash this into the relevant patch (commit af7747e7c7 ("tests: optionally write results as JUnit-style .xml", 2019-01-23)). Thanks! ATB, Ramsay Jones t/helper/test-xml-encode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/helper/test-xml-encode.c b/t/helper/test-xml-encode.c index 367c4875e6..a648bbd961 100644 --- a/t/helper/test-xml-encode.c +++ b/t/helper/test-xml-encode.c @@ -26,7 +26,7 @@ int cmd__xml_encode(int argc, const char **argv) if (tmp2) { if ((ch & 0xc0) != 0x80) { fputs(utf8_replace_character, stdout); - tmp2 = 0; + tmp2 = NULL; cur--; continue; } @@ -34,7 +34,7 @@ int cmd__xml_encode(int argc, const char **argv) tmp2++; if (--remaining == 0) { fwrite(tmp, tmp2 - tmp, 1, stdout); - tmp2 = 0; + tmp2 = NULL; } continue; }