[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] grub-core/net/http.c: Fix gcc-13 errors relating to type sig
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] grub-core/net/http.c: Fix gcc-13 errors relating to type signedness |
Date: |
Wed, 29 Nov 2023 20:25:52 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sun, Nov 26, 2023 at 09:50:41AM +0000, Mate Kukri wrote:
> Add explicit casts of HTTP_PORT to int to match the type of the port
> variable.
>
> Signed-off-by: Mate Kukri <mate.kukri@canonical.com>
> ---
> grub-core/net/http.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/grub-core/net/http.c b/grub-core/net/http.c
> index df690acf6..d7b91c1f6 100644
> --- a/grub-core/net/http.c
> +++ b/grub-core/net/http.c
> @@ -405,9 +405,9 @@ http_establish (struct grub_file *file, grub_off_t
> offset, int initial)
> grub_memcpy (ptr, "\r\n", 2);
>
> grub_dprintf ("http", "opening path %s on host %s TCP port %d\n",
> - data->filename, server, port ? port : HTTP_PORT);
> + data->filename, server, port ? port : (int) HTTP_PORT);
> data->sock = grub_net_tcp_open (server,
> - port ? port : HTTP_PORT, http_receive,
> + port ? port : (int) HTTP_PORT, http_receive,
Why do not define HTTP_PORT as "#define HTTP_PORT ((grub_uint16_t) 80)"?
However, then I would define port as grub_uint16_t too...
Daniel