mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
Fix unecessary assert with always true assertions in gio/gresource-tool.c
gio/gresource-tool.c: In function ‘elf_foreach_resource_section’: gio/gresource-tool.c:190:22: error: comparison of unsigned expression in ‘>= 0’ is always true 190 | g_assert (shstrndx >= 0); | ^~ gio/gresource-tool.c:193:19: error: comparison of unsigned expression in ‘>= 0’ is always true 193 | g_assert (shnum >= 0); | ^~
This commit is contained in:
parent
1f23770bc3
commit
0214d892ba
@ -180,17 +180,18 @@ elf_foreach_resource_section (Elf *elf,
|
||||
SectionCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
int ret;
|
||||
size_t shstrndx, shnum;
|
||||
size_t scnidx;
|
||||
Elf_Scn *scn;
|
||||
GElf_Shdr *shdr, shdr_mem;
|
||||
const gchar *section_name;
|
||||
|
||||
elf_getshdrstrndx (elf, &shstrndx);
|
||||
g_assert (shstrndx >= 0);
|
||||
ret = elf_getshdrstrndx (elf, &shstrndx);
|
||||
g_assert (ret == 0);
|
||||
|
||||
elf_getshdrnum (elf, &shnum);
|
||||
g_assert (shnum >= 0);
|
||||
ret = elf_getshdrnum (elf, &shnum);
|
||||
g_assert (ret == 0);
|
||||
|
||||
for (scnidx = 1; scnidx < shnum; scnidx++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user