From 7fd7611b23ad33ed8bb7db44916cb03bbc2c47c1 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 1 Dec 2009 14:12:01 -0800 Subject: [PATCH] compat/getdelim: Silence a warning about mixing of signed/unsigned. If the length is ever so large as to overflow, then we'll end up returning a negative value (which indicates an error anyway). --- compat/getdelim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/getdelim.c b/compat/getdelim.c index 84bef87b..1bedef7c 100644 --- a/compat/getdelim.c +++ b/compat/getdelim.c @@ -124,7 +124,7 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) break; } (*lineptr)[cur_len] = '\0'; - result = cur_len ? cur_len : result; + result = cur_len ? (ssize_t) cur_len : result; unlock_return: funlockfile (fp); /* doesn't set errno */ -- 2.26.2