This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new d251d12f6 Fixed compiler warnings.
d251d12f6 is described below

commit d251d12f6fa20833245e41db5a886657049f089c
Author: Fotis Panagiotopoulos <f.j.pa...@gmail.com>
AuthorDate: Sun Oct 23 19:10:56 2022 +0300

    Fixed compiler warnings.
---
 netutils/netlib/netlib_parseurl.c |  2 +-
 netutils/webclient/webclient.c    | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/netutils/netlib/netlib_parseurl.c 
b/netutils/netlib/netlib_parseurl.c
index 775f2f189..a80612966 100644
--- a/netutils/netlib/netlib_parseurl.c
+++ b/netutils/netlib/netlib_parseurl.c
@@ -59,7 +59,7 @@ int netlib_parseurl(FAR const char *str, FAR struct url_s 
*url)
 {
   FAR const char *src = str;
   FAR char *dest;
-  int bytesleft;
+  size_t bytesleft;
   int ret = OK;
   size_t pathlen;
 
diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c
index a24c877cd..41cfe94d9 100644
--- a/netutils/webclient/webclient.c
+++ b/netutils/webclient/webclient.c
@@ -285,6 +285,7 @@ static int webclient_static_body_func(FAR void *buffer,
                                       size_t reqsize,
                                       FAR void *ctx)
 {
+  UNUSED(buffer);
   *datap = ctx;
   *sizep = reqsize;
   return 0;
@@ -798,6 +799,8 @@ static inline int wget_parsechunkheader(struct 
webclient_context *ctx,
   int ndx;
   int ret = OK;
 
+  UNUSED(ctx);
+
   offset = ws->offset;
   ndx    = ws->ndx;
 
@@ -908,6 +911,8 @@ static inline int wget_parsechunkenddata(struct 
webclient_context *ctx,
   int ndx;
   int ret = OK;
 
+  UNUSED(ctx);
+
   offset = ws->offset;
   ndx    = ws->ndx;
 
@@ -966,6 +971,8 @@ static inline int wget_parsechunktrailer(struct 
webclient_context *ctx,
   int ndx;
   int ret = OK;
 
+  UNUSED(ctx);
+
   offset = ws->offset;
   ndx    = ws->ndx;
 
@@ -1871,7 +1878,7 @@ int webclient_perform(FAR struct webclient_context *ctx)
 
               DEBUGASSERT(bytes_to_send <= ws->state_len);
               ssize_t ssz = webclient_conn_send(conn,
-                                                ws->data_buffer +
+                                                (char *)ws->data_buffer +
                                                 ws->state_offset,
                                                 bytes_to_send);
               if (ssz < 0)
@@ -1891,7 +1898,7 @@ int webclient_perform(FAR struct webclient_context *ctx)
               ws->state_len -= ssz;
               ws->state_offset += ssz;
               DEBUGASSERT(ws->state_offset <= ws->data_len);
-              if (ws->state_offset == ws->data_len)
+              if ((size_t)ws->state_offset == ws->data_len)
                 {
                   ws->data_buffer = NULL;
                 }

Reply via email to