{"thread":{"id":"42130","subject":"[PATCH] convert.c: fix some sparse warnings","startedAt":"2016-04-24T17:14:10Z","lastAt":"2016-04-25T04:15:04Z","messageCount":2,"participants":["Ramsay Jones","Torsten Bögershausen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"284345","messageId":"571CFEE2.2070708@ramsayjones.plus.com","threadId":"42130","inReplyTo":null,"subject":"[PATCH] convert.c: fix some sparse warnings","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2016-04-24T17:14:10Z","receivedAt":"2016-04-24T17:14:10Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSparse complains thus:\n\n      SP convert.c\n  convert.c:178:24: warning: Using plain integer as NULL pointer\n  convert.c:239:28: warning: dubious: !x & y\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Torsten,\n\nWhen you next re-roll your 'tb/convert-eol-autocrlf' branch, could you\nplease squash this into your patch corresponding to commit cbcc0471\n(\"convert.c: more safer crlf handling with text attribute\", 22-04-2016).\n\n[No, you have seen this before! ;-) ]\n\nThanks!\n\nATB,\nRamsay Jones\n\n convert.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/convert.c b/convert.c\nindex 8d4c42a..3d36c45 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -175,7 +175,7 @@ const char *get_wt_convert_stats_ascii(const char *path)\n \tmemset(&stats, 0, sizeof(stats));\n \tfd = open(path, O_RDONLY);\n \tif (fd < 0)\n-\t\treturn 0;\n+\t\treturn NULL;\n \tfor (;;) {\n \t\tchar buf[1024];\n \t\tssize_t readlen = read(fd, buf, sizeof(buf));\n@@ -236,7 +236,7 @@ static int would_convert_lf_at_checkout(unsigned convert_stats,\n \t\treturn 0;\n \n \t/* No \"naked\" LF? Nothing to convert, regardless. */\n-\tif (!convert_stats & CONVERT_STAT_BITS_TXT_LF)\n+\tif (!(convert_stats & CONVERT_STAT_BITS_TXT_LF))\n \t\treturn 0;\n \n \tif (crlf_action == CRLF_AUTO ||\n-- \n2.8.0\n"},{"id":"284371","messageId":"571D99C8.3050006@web.de","threadId":"42130","inReplyTo":"571CFEE2.2070708@ramsayjones.plus.com","subject":"Re: [PATCH] convert.c: fix some sparse warnings","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2016-04-25T04:15:04Z","receivedAt":"2016-04-25T04:15:04Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 04/24/2016 07:14 PM, Ramsay Jones wrote:\n> Sparse complains thus:\n>\n>        SP convert.c\n>    convert.c:178:24: warning: Using plain integer as NULL pointer\n>    convert.c:239:28: warning: dubious: !x & y\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n> ---\n>\n> Hi Torsten,\n>\n> When you next re-roll your 'tb/convert-eol-autocrlf' branch, could you\n> please squash this into your patch corresponding to commit cbcc0471\n> (\"convert.c: more safer crlf handling with text attribute\", 22-04-2016).\n>\n> [No, you have seen this before! ;-) ]\n>\n> Thanks!\nThanks,\nyour update has been applied and was lost later. Sorry for that.\nI will send out a v7, after waiting for more comments on v6b.\n"}]}