Re: [PATCH] src/sort.c: pipe_fork is always called with tries > 0

2010-01-06 Thread Kovarththanan Rajaratnam
Jim Meyering wrote: > Kovarththanan Rajaratnam wrote: >> clang detected the following false positive: >> >> sort.c:906:11: warning: The left operand of '<' is a garbage value >> if (pid < 0) >> ~~~ ^ >> >> src/sort.c: Add an ass

Re: [PATCH] src/sort.c: sort() is always called with nfiles > 0

2010-01-06 Thread Kovarththanan Rajaratnam
Pádraig Brady wrote: > On 06/01/10 08:36, Kovarththanan Rajaratnam wrote: >> clang detected the following false positive: >> >> sort.c:2946:3: warning: Pass-by-value argument in function call is >> undefined >>free (buf.buf); >>^ ~~~ >>

Re: [PATCH] src/sort.c: assert on temp.text before calling memcpy()

2010-01-06 Thread Kovarththanan Rajaratnam
ich is non null. That is why I preferred the assert(). Is this assumption incorrect? -- Best regards, Kovarththanan Rajaratnam

[PATCH] src/sort.c: fix signed/unsigned pointer mismatch in find_unit_order()

2010-01-06 Thread Kovarththanan Rajaratnam
Signed-off-by: Kovarththanan Rajaratnam --- src/sort.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/sort.c b/src/sort.c index 039df13..ac5d29f 100644 --- a/src/sort.c +++ b/src/sort.c @@ -1730,7 +1730,7 @@ find_unit_order (const char *number, struct keyfield

[PATCH] src/sort.c: sort() is always called with nfiles > 0

2010-01-06 Thread Kovarththanan Rajaratnam
is always set/valid. Signed-off-by: Kovarththanan Rajaratnam --- src/sort.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/sort.c b/src/sort.c index 9c25723..039df13 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2874,6 +2874,8 @@ sort (char * const *files, size_t

[PATCH] src/sort.c: pipe_fork is always called with tries > 0

2010-01-06 Thread Kovarththanan Rajaratnam
; will always be set/is valid. Signed-off-by: Kovarththanan Rajaratnam --- src/sort.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/sort.c b/src/sort.c index 010930b..9c25723 100644 --- a/src/sort.c +++ b/src/sort.c @@ -874,6 +874,8 @@ pipe_fork (int pipefds[2], size_

[PATCH] src/sort.c: assert on saved.text before calling memcpy()

2010-01-06 Thread Kovarththanan Rajaratnam
o be non null. Signed-off-by: Kovarththanan Rajaratnam --- src/sort.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/sort.c b/src/sort.c index b50f6cd..010930b 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2432,6 +2432,7 @@ mergefps (struct sortfile *files, size_t n

[PATCH] src/sort.c: assert on temp.text before calling memcpy()

2010-01-05 Thread Kovarththanan Rajaratnam
>From c65f5323d2c187e01e73c7a074382f77ff8ee708 Mon Sep 17 00:00:00 2001 From: Kovarththanan Rajaratnam Date: Tue, 5 Jan 2010 20:24:02 +0100 Subject: [PATCH] src/sort.c: assert on temp.text before calling memcpy() clang detected the following false positive: sort.c:2292:7: warning: Null poin