From: Jo-Philipp Wich Date: Tue, 14 Mar 2017 23:47:23 +0000 (+0100) Subject: libbb: fix gzip_thread() warnings X-Git-Url: http://git.openwrt.org/openwrt/docs.git?a=commitdiff_plain;h=6e28563d0023ce0261e2756e5eb120790c5fe6e9;p=project%2Fopkg-lede.git libbb: fix gzip_thread() warnings - mark function static - add missing return statement - avoid uninitialized use of "len" Signed-off-by: Jo-Philipp Wich --- diff --git a/libbb/gzip.c b/libbb/gzip.c index db22523..dc3b283 100644 --- a/libbb/gzip.c +++ b/libbb/gzip.c @@ -41,11 +41,11 @@ static void to_devnull(int fd) close(devnull); } -void *gzip_thread(void *ptr) +static void *gzip_thread(void *ptr) { struct gzip_handle *zh = ptr; char buf[4096]; - int len, ret; + int len = 0, ret; while (1) { if (zh->file) @@ -63,6 +63,8 @@ void *gzip_thread(void *ptr) close(zh->wfd); zh->wfd = -1; + + return NULL; } int gzip_exec(struct gzip_handle *zh, const char *filename)