From: Carl Worth Date: Tue, 1 Dec 2009 22:12:01 +0000 (-0800) Subject: compat/getdelim: Silence a warning about mixing of signed/unsigned. X-Git-Tag: 0.1~264 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=7fd7611b23ad33ed8bb7db44916cb03bbc2c47c1 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). --- 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 */