mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
greenhills: fix the pointless compare warning
CC: modlib/modlib_depend.c "modlib/modlib_bind.c", line 741: warning #186-D: pointless comparison of unsigned integer with zero if (rel->r_offset < 0) ^ Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
04f5aaebfa
commit
cc79201c59
1 changed files with 3 additions and 15 deletions
|
@ -731,25 +731,13 @@ static int modlib_relocatedyn(FAR struct module_s *modp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Calculate the relocation address. */
|
|
||||||
|
|
||||||
if (rel->r_offset < 0)
|
|
||||||
{
|
|
||||||
berr("ERROR: Section %d reloc %d:"
|
|
||||||
"Relocation address out of range, offset %u\n",
|
|
||||||
relidx, i, (int)rel->r_offset);
|
|
||||||
ret = -EINVAL;
|
|
||||||
lib_free(sym);
|
|
||||||
lib_free(rels);
|
|
||||||
lib_free(dyn);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now perform the architecture-specific relocation */
|
/* Now perform the architecture-specific relocation */
|
||||||
|
|
||||||
if ((idx_sym = ELF_R_SYM(rel->r_info)) != 0)
|
if ((idx_sym = ELF_R_SYM(rel->r_info)) != 0)
|
||||||
{
|
{
|
||||||
if (sym[idx_sym].st_shndx == SHN_UNDEF) /* We have an external reference */
|
/* We have an external reference */
|
||||||
|
|
||||||
|
if (sym[idx_sym].st_shndx == SHN_UNDEF)
|
||||||
{
|
{
|
||||||
FAR void *ep;
|
FAR void *ep;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue