Fix extra compiler warnings
[project/uclient.git] / uclient-http.c
index 3168f4c6a58aa372c70587318e5cd80aa4f9c492..279669620ebe659b5904d6e3275b991e40f1e700 100644 (file)
@@ -199,7 +199,8 @@ static void uclient_notify_eof(struct uclient_http *uh)
                        return;
        }
 
-       if (uh->content_length < 0 && uh->read_chunked >= 0)
+       if ((uh->content_length < 0 && uh->read_chunked >= 0) ||
+                       uh->content_length == 0)
                uh->uc.data_eof = true;
 
        uclient_backend_set_eof(&uh->uc);
@@ -595,7 +596,8 @@ uclient_http_send_headers(struct uclient_http *uh)
        struct blob_attr *cur;
        enum request_type req_type = uh->req_type;
        bool literal_ipv6;
-       int err, rem;
+       int err;
+       size_t rem;
 
        if (uh->state >= HTTP_STATE_HEADERS_SENT)
                return 0;
@@ -981,7 +983,7 @@ int
 uclient_http_set_request_type(struct uclient *cl, const char *type)
 {
        struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
-       int i;
+       unsigned int i;
 
        if (cl->backend != &uclient_backend_http)
                return -1;