Use loff_t consistently to fix these warnings on -m32 builds on 64-bit: libgcore/gcore_coredump.c: In function ‘writenote’: libgcore/gcore_coredump.c:701:58: warning: passing argument 3 of ‘gcore->elf->ops->write_note_header’ from incompatible pointer type [-Wincompatible-pointer-types] if (!gcore->elf->ops->write_note_header(gcore->elf, fp, foffset)) ^~~~~~~ libgcore/gcore_coredump.c:701:58: note: expected ‘off_t *’ {aka ‘long int *’} but argument is of type ‘loff_t *’ {aka ‘long long int *’} Signed-off-by: Vincent Whitchurch <vincent.whitchurch@xxxxxxxx> --- src/libgcore/gcore_defs.h | 2 +- src/libgcore/gcore_elf_struct.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libgcore/gcore_defs.h b/src/libgcore/gcore_defs.h index 3233ea5..409678e 100644 --- a/src/libgcore/gcore_defs.h +++ b/src/libgcore/gcore_defs.h @@ -1232,7 +1232,7 @@ struct gcore_elf_operations int (*write_section_header)(struct gcore_elf_struct *this, FILE *fp); int (*write_program_header)(struct gcore_elf_struct *this, FILE *fp); int (*write_note_header)(struct gcore_elf_struct *this, FILE *fp, - off_t *offset); + loff_t *offset); uint64_t (*get_e_phoff)(struct gcore_elf_struct *this); uint64_t (*get_e_shoff)(struct gcore_elf_struct *this); diff --git a/src/libgcore/gcore_elf_struct.c b/src/libgcore/gcore_elf_struct.c index 2aca984..b31388a 100644 --- a/src/libgcore/gcore_elf_struct.c +++ b/src/libgcore/gcore_elf_struct.c @@ -141,7 +141,7 @@ static int elf64_write_program_header(struct gcore_elf_struct *this, FILE *fp) } static int elf64_write_note_header(struct gcore_elf_struct *this, FILE *fp, - off_t *offset) + loff_t *offset) { Elf64_Nhdr *n = &((struct gcore_elf64_struct *)this)->nhdr; @@ -314,7 +314,7 @@ static int elf32_write_program_header(struct gcore_elf_struct *this, FILE *fp) } static int elf32_write_note_header(struct gcore_elf_struct *this, FILE *fp, - off_t *offset) + loff_t *offset) { Elf32_Nhdr *n = &((struct gcore_elf32_struct *)this)->nhdr; -- 2.28.0 -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki