summaryrefslogtreecommitdiff
path: root/uclient-http.c
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2020-12-08 17:29:57 +0100
committerPetr Štetiar <ynezz@true.cz>2020-12-11 11:17:22 +0100
commite6b5b8a98ce21d4b8374370b5d7592ead4b351e5 (patch)
treeecca0ed72e1efbe3c795c4b33fab454aab6016b9 /uclient-http.c
parent12df67e45bb0865edecc4f963afcec79077f213e (diff)
downloaduclient-e6b5b8a98ce21d4b8374370b5d7592ead4b351e5.tar.gz
Fix extra compiler warnings
Fixes following -Wextra compiler warnings: uclient.c:195:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] for (i = 0; i < ARRAY_SIZE(backends); i++) { ~ ^ ~~~~~~~~~~~~~~~~~~~~ uclient-http.c:619:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] blobmsg_for_each_attr(cur, uh->headers.head, rem) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uclient-http.c:619:2: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] blobmsg_for_each_attr(cur, uh->headers.head, rem) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uclient-http.c:993:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] for (i = 0; i < ARRAY_SIZE(request_types); i++) { ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ uclient.c:195:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] for (i = 0; i < ARRAY_SIZE(backends); i++) { ~ ^ ~~~~~~~~~~~~~~~~~~~~ uclient-http.c:619:2: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] blobmsg_for_each_attr(cur, uh->headers.head, rem) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uclient-http.c:619:2: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] blobmsg_for_each_attr(cur, uh->headers.head, rem) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uclient-http.c:993:16: error: comparison of integers of different signs: 'int' and 'unsigned long' [-Werror,-Wsign-compare] for (i = 0; i < ARRAY_SIZE(request_types); i++) { ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ uclient-fetch.c:551:67: error: missing field 'flag' initializer [-Werror,-Wmissing-field-initializers] [L_NO_CHECK_CERTIFICATE] = { "no-check-certificate", no_argument }, Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'uclient-http.c')
-rw-r--r--uclient-http.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/uclient-http.c b/uclient-http.c
index c1f7228..2796696 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -596,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;
@@ -982,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;