elf_get_uint(elf, off + offsetof(typeof(*hdr), field), sizeof(hdr->field))
if (elf->class & KMOD_ELF_32) {
- const Elf32_Shdr *hdr _unused_ = (const Elf32_Shdr *)p;
+ Elf32_Shdr *hdr;
*size = READV(sh_size);
*offset = READV(sh_offset);
*nameoff = READV(sh_name);
} else {
- const Elf64_Shdr *hdr _unused_ = (const Elf64_Shdr *)p;
+ Elf64_Shdr *hdr;
*size = READV(sh_size);
*offset = READV(sh_offset);
*nameoff = READV(sh_name);
elf->header.strings.section = READV(e_shstrndx); \
elf->header.machine = READV(e_machine)
if (elf->class & KMOD_ELF_32) {
- const Elf32_Ehdr *hdr _unused_ = elf_get_mem(elf, 0);
+ Elf32_Ehdr *hdr;
LOAD_HEADER;
shdr_size = sizeof(Elf32_Shdr);
} else {
- const Elf64_Ehdr *hdr _unused_ = elf_get_mem(elf, 0);
+ Elf64_Ehdr *hdr;
LOAD_HEADER;
shdr_size = sizeof(Elf64_Shdr);
}
#define _must_check_ __attribute__((warn_unused_result))
#define _printf_format_(a, b) __attribute__((format(printf, a, b)))
-#define _unused_ __attribute__((unused))
#define _always_inline_ __inline__ __attribute__((always_inline))
#define _cleanup_(x) __attribute__((cleanup(x)))
#define _nonnull_(...) __attribute__((nonnull(__VA_ARGS__)))