diff options
author | midipix <writeonce@midipix.org> | 2024-02-22 07:45:41 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-02-22 07:45:41 +0000 |
commit | caef1086b335dd241d415af58f4685e441e60729 (patch) | |
tree | a3e2aba65ffac2c4dffbc17b3f81f1e41e0ba854 /src | |
parent | e55918716e736aa1075de00607ec2bb730e8b5e2 (diff) | |
download | perk-caef1086b335dd241d415af58f4685e441e60729.tar.bz2 perk-caef1086b335dd241d415af58f4685e441e60729.tar.xz |
pe_output_mdso_libraries() c99 conformance: avoid void * in pointer arithmetic.
Diffstat (limited to 'src')
-rw-r--r-- | src/output/pe_output_mdso_libraries.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/output/pe_output_mdso_libraries.c b/src/output/pe_output_mdso_libraries.c index f973a8e..c5ee1b4 100644 --- a/src/output/pe_output_mdso_libraries.c +++ b/src/output/pe_output_mdso_libraries.c @@ -74,6 +74,7 @@ static char * dsolib_name(const struct pe_image_meta * m, int i) { uintptr_t va; uint64_t rva; + char * addr; uint32_t roffset; struct mdso_raw_meta_record_m32 * mdso32; struct mdso_raw_meta_record_m64 * mdso64; @@ -94,7 +95,7 @@ static char * dsolib_name(const struct pe_image_meta * m, int i) if (pe_get_roffset_from_rva(m,(uint32_t)rva,&roffset) < 0) return 0; - return m->r_image.map_addr + roffset; + return (addr = m->r_image.map_addr) + roffset; } static unsigned char * dsosym_meta(const struct pe_image_meta * m, int j) @@ -133,6 +134,7 @@ static char * dsosym_string(const struct pe_image_meta * m, int j) { uint64_t va; uint32_t rva; + char * addr; uint32_t roffset; struct mdso_raw_sym_entry_m32 * sym32; struct mdso_raw_sym_entry_m64 * sym64; @@ -158,7 +160,7 @@ static char * dsosym_string(const struct pe_image_meta * m, int j) if (pe_get_roffset_from_rva(m,rva,&roffset) < 0) return 0; - return m->r_image.map_addr + roffset; + return (addr = m->r_image.map_addr) + roffset; } int pe_output_mdso_libraries( |