Actions
Bug #14300
closedmbh_patch: comparison of integers of different signs
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
Build errors:
mbh_patch.c:141:20: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] for (mem = 0; mem < 8192 - sizeof (multiboot_header_t); mem += 4) { ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mbh_patch.c:147:10: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] if (mem >= 8192 - sizeof (multiboot_header_t)) { ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mbh_patch.c:160:11: error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare] mem2 <= MULTIBOOT_SEARCH - sizeof (multiboot2_header_t); ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mbh_patch.c:202:12: error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare] (mem >= (phdr->p_offset + phdr->p_filesz))) { ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mbh_patch.c:201:12: error: comparison of integers of different signs: 'int' and 'Elf64_Off' (aka 'unsigned long long') [-Werror,-Wsign-compare] if ((mem < phdr->p_offset) || ~~~ ^ ~~~~~~~~~~~~~~ mbh_patch.c:214:13: error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare] (mem2 >= (phdr->p_offset + phdr->p_filesz)))) { ~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mbh_patch.c:213:30: error: comparison of integers of different signs: 'int' and 'Elf64_Off' (aka 'unsigned long long') [-Werror,-Wsign-compare] if (mbh2 != NULL && ((mem2 < phdr->p_offset) || ~~~~ ^ ~~~~~~~~~~~~~~ 7 errors generated.
Testing done: build/install/boot - so the kernel is patched OK.
Updated by Electric Monk 8 months ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit af0ef7c472bfce1509e929cd90cad4d773980e53
commit af0ef7c472bfce1509e929cd90cad4d773980e53 Author: Toomas Soome <tsoome@me.com> Date: 2022-01-05T16:41:45.000Z 14300 mbh_patch: comparison of integers of different signs Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Actions