grub-core/net/http.c: Fix gcc-13 errors relating to type signedness
PATCH v2 1/1 grub-core/net/http.c: Fix gcc-13 errors relating to type signedness
Replace definition of HTTP_PORT with a pre-processor macro that converts the constant to the correct type grub_uint16_t.
Change the defintion of local variable port in http_establish() to have the same type.
Signed-off-by Mate Kukri <[email protected]>
--- grub-core/net/http.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
grub-core/net/http.c +2 -6
@@ -29,11 +29,7 @@GRUB_MOD_LICENSE ("GPLv3+" ); -enum - { -HTTP_PORT =80 - }; - +#define HTTP_PORT ((grub_uint16_t) 80) typedef struct http_data {
@@ -319,7 +315,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)struct grub_net_buff *nb;grub_err_t err;char *server = file->device->net->server; -int port = file->device->net->port; +grub_uint16_t port = file->device->net->port; nb =grub_netbuff_alloc (GRUB_NET_TCP_RESERVE_SIZE + sizeof ("GET ") - 1
Signature · 7 lines
2.39.2 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
Quoted 7 lines · Mate Kukri
Replace definition of
HTTP_PORTwith a pre-processor macro that converts the constant to the correct typegrub_uint16_t.Change the defintion of local variable
portinhttp_establish()to have the same type.Signed-off-by Mate Kukri <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel