git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] test-xml-encode: fix sparse NULL pointer warnings

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Jan 26, 2019, 21:03 UTC
Message-ID
<68a8c70e-dc42-1df3-3616-c096f63cb848@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
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;
 		}
-- 
2.20.0
Next: Johannes Schindelin
Message 1 of 8 in “test-xml-encode: fix sparse NULL pointer warnings”
  1. test-xml-encode: fix sparse NULL pointer warningsRamsay Jones, Jan 26, 2019
  2. sparse job, was Re: [PATCH] test-xml-encode: fix sparse NULL pointer warningsJohannes Schindelin, Jan 28, 2019
  3. Ramsay JonesJan 28, 2019
  4. Johannes SchindelinJan 28, 2019
  5. Ramsay JonesJan 29, 2019
  6. Jonathan NiederJan 29, 2019
  7. Luc Van OostenryckJan 29, 2019
  8. Ramsay JonesJan 29, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.