* [PATCH] convert.c: fix some sparse warnings
@ 2016-04-03 18:43 Ramsay Jones
0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2016-04-03 18:43 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Junio C Hamano, GIT Mailing-list
Sparse complains thus:
SP convert.c
convert.c:180:24: warning: Using plain integer as NULL pointer
convert.c:241:28: warning: dubious: !x & y
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Torsten,
When you re-roll your 'tb/safe-crlf-output-fix' branch, could you
please squash this into your patch (corresponding to commit 9c7b132f,
"convert.c: more safer crlf handling with text attribute", 01-04-2016).
>From an earlier email, I see that you are aware that t6038 is failing, so
I won't look into that.
Thanks!
ATB,
Ramsay Jones
convert.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert.c b/convert.c
index 1fddbe8..1fa7986 100644
--- a/convert.c
+++ b/convert.c
@@ -177,7 +177,7 @@ const char *get_wt_convert_stats_ascii(const char *path)
memset(&stats, 0, sizeof(stats));
fd = open(path, O_RDONLY);
if (fd < 0)
- return 0;
+ return NULL;
for (;;) {
char buf[1024];
ssize_t readlen = read(fd, buf, sizeof(buf));
@@ -238,7 +238,7 @@ static int would_convert_lf_at_checkout(unsigned convert_stats,
return 0;
/* No "naked" LF? Nothing to convert, regardless. */
- if (!convert_stats & CONVERT_STAT_BITS_TXT_LF)
+ if (!(convert_stats & CONVERT_STAT_BITS_TXT_LF))
return 0;
if (crlf_action == CRLF_AUTO ||
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] convert.c: fix some sparse warnings
@ 2016-04-24 17:14 Ramsay Jones
2016-04-25 4:15 ` Torsten Bögershausen
0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2016-04-24 17:14 UTC (permalink / raw)
To: Torsten Bögershausen; +Cc: Junio C Hamano, GIT Mailing-list
Sparse complains thus:
SP convert.c
convert.c:178:24: warning: Using plain integer as NULL pointer
convert.c:239:28: warning: dubious: !x & y
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Torsten,
When you next re-roll your 'tb/convert-eol-autocrlf' branch, could you
please squash this into your patch corresponding to commit cbcc0471
("convert.c: more safer crlf handling with text attribute", 22-04-2016).
[No, you have seen this before! ;-) ]
Thanks!
ATB,
Ramsay Jones
convert.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/convert.c b/convert.c
index 8d4c42a..3d36c45 100644
--- a/convert.c
+++ b/convert.c
@@ -175,7 +175,7 @@ const char *get_wt_convert_stats_ascii(const char *path)
memset(&stats, 0, sizeof(stats));
fd = open(path, O_RDONLY);
if (fd < 0)
- return 0;
+ return NULL;
for (;;) {
char buf[1024];
ssize_t readlen = read(fd, buf, sizeof(buf));
@@ -236,7 +236,7 @@ static int would_convert_lf_at_checkout(unsigned convert_stats,
return 0;
/* No "naked" LF? Nothing to convert, regardless. */
- if (!convert_stats & CONVERT_STAT_BITS_TXT_LF)
+ if (!(convert_stats & CONVERT_STAT_BITS_TXT_LF))
return 0;
if (crlf_action == CRLF_AUTO ||
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] convert.c: fix some sparse warnings
2016-04-24 17:14 [PATCH] convert.c: fix some sparse warnings Ramsay Jones
@ 2016-04-25 4:15 ` Torsten Bögershausen
0 siblings, 0 replies; 3+ messages in thread
From: Torsten Bögershausen @ 2016-04-25 4:15 UTC (permalink / raw)
To: Ramsay Jones, Torsten Bögershausen; +Cc: Junio C Hamano, GIT Mailing-list
On 04/24/2016 07:14 PM, Ramsay Jones wrote:
> Sparse complains thus:
>
> SP convert.c
> convert.c:178:24: warning: Using plain integer as NULL pointer
> convert.c:239:28: warning: dubious: !x & y
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Torsten,
>
> When you next re-roll your 'tb/convert-eol-autocrlf' branch, could you
> please squash this into your patch corresponding to commit cbcc0471
> ("convert.c: more safer crlf handling with text attribute", 22-04-2016).
>
> [No, you have seen this before! ;-) ]
>
> Thanks!
Thanks,
your update has been applied and was lost later. Sorry for that.
I will send out a v7, after waiting for more comments on v6b.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-25 4:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-24 17:14 [PATCH] convert.c: fix some sparse warnings Ramsay Jones
2016-04-25 4:15 ` Torsten Bögershausen
-- strict thread matches above, loose matches on Subject: below --
2016-04-03 18:43 Ramsay Jones
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).