[bug #63246] New -Wsign-compare with GCC 13

Martin Liška <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/bugs/?63246>

                 Summary: New -Wsign-compare with GCC 13
                 Project: GNU GRUB
               Submitter: marxin
               Submitted: Thu 20 Oct 2022 03:47:46 PM UTC
                Category: None
                Severity: Major
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: Git master
                 Release: 
         Discussion Lock: Any
         Reproducibility: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 20 Oct 2022 03:47:46 PM UTC By: Martin Liška <marxin>
[  168s] ../../grub-core/net/http.c: In function 'http_establish':
[  168s] ../../grub-core/net/http.c:414:48: error: operand of '?:' changes
signedness from 'int' to 'enum <anonymous>' due to unsignedness of other
operand [-Werror=sign-compare]
[  168s]   414 |                 data->filename, server, port ? port :
HTTP_PORT);
[  168s]       |                                                ^~~~
[  168s] ../../include/grub/misc.h:38:88: note: in definition of macro
'grub_dprintf'
[  168s]    38 | #define grub_dprintf(condition, ...)
grub_real_dprintf(GRUB_FILE, __LINE__, condition, __VA_ARGS__)
[  168s]       |                                                              
                         ^~~~~~~~~~~
[  168s] ../../grub-core/net/http.c:416:42: error: operand of '?:' changes
signedness from 'int' to 'enum <anonymous>' due to unsignedness of other
operand [-Werror=sign-compare]
[  168s]   416 |                                   port ? port : HTTP_PORT,
http_receive,
[  168s]       |                                          ^~~~

and it's reported as GCC issue here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107314







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63246>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.