libbb: fix gzip_thread() warnings
[oweals/opkg-lede.git] / libbb / gzip.c
index db22523900a77151c265dccf7e9fc0bf23e3dd95..dc3b2834aec212eb05be62973b5fdbff33a02173 100644 (file)
@@ -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)