[OpenWrt-Devel] [PATCH 2/3] [rpcd] file: handle return output of b64_decode

Jo-Philipp Wich jow at openwrt.org
Tue Apr 12 02:56:59 EDT 2016


Hi Luka,

Please use ssize_t instead.

Regards,
Jo

> Am 11.04.2016 um 18:56 schrieb Luka Perkov <luka at openwrt.org>:
> 
> Solve this compile warning:
> 
> file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
>                if (data_len < 0)
> 
> Signed-off-by: Luka Perkov <luka at openwrt.org>
> ---
> file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/file.c b/file.c
> index 91a55a1..6ddde32 100644
> --- a/file.c
> +++ b/file.c
> @@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj,
>    mode_t prev_mode, mode = 0666;
>    int fd, rv = 0;
>    void *data = NULL;
> -    size_t data_len = 0;
> +    int data_len = 0;
> 
>    blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb,
>                  blob_data(msg), blob_len(msg));
> -- 
> 2.8.0
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list