Skip to contentSkip to conversation

OBP available region patch fails with clang

DISCUSSION Andrei Borzenkov 2 participants 2 messages Feb 24, 2016

lore
Share & tools
lore
#0 lore raw

kern/ieee1275/mmap.c:52:22: error: comparison of integers of different
signs: 'grub_ssize_t'
(aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
if (available_size > sizeof (available))

      ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~

1 error generated.

While we can of course cast to (grub_ssize_t) sizeof (available) - should not we check for available_size < 0 as well?

#1 lore raw
Quoted 10 lines · Andrei Borzenkov

kern/ieee1275/mmap.c:52:22: error: comparison of integers of different
signs: 'grub_ssize_t'
(aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
if (available_size > sizeof (available))

      ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~

1 error generated.

While we can of course cast to (grub_ssize_t) sizeof (available) - should not we check for available_size < 0 as well?

I have fixed it locally but forgot to push

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel