mirror of
https://github.com/serge1/ELFIO.git
synced 2025-01-29 21:32:44 +00:00
Address warnings reported by Windows compilation
This commit is contained in:
parent
9fb99af870
commit
1e6d24d40e
2
.github/workflows/c-cpp.yml
vendored
2
.github/workflows/c-cpp.yml
vendored
@ -29,5 +29,5 @@ jobs:
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest -VV -C ${{ matrix.build_type }}
|
||||
ctest -C ${{ matrix.build_type }}
|
||||
cd ..
|
||||
|
@ -201,7 +201,7 @@ template <class S> class dynamic_section_accessor_template
|
||||
case DT_SYMBOLIC:
|
||||
case DT_TEXTREL:
|
||||
case DT_BIND_NOW:
|
||||
entry.d_un.d_val = convertor( 0 );
|
||||
entry.d_un.d_val = convertor( decltype( entry.d_un.d_val )( 0 ) );
|
||||
break;
|
||||
case DT_NEEDED:
|
||||
case DT_PLTRELSZ:
|
||||
@ -219,7 +219,8 @@ template <class S> class dynamic_section_accessor_template
|
||||
case DT_RUNPATH:
|
||||
case DT_FLAGS:
|
||||
case DT_PREINIT_ARRAYSZ:
|
||||
entry.d_un.d_val = convertor( value );
|
||||
entry.d_un.d_val =
|
||||
convertor( decltype( entry.d_un.d_val )( value ) );
|
||||
break;
|
||||
case DT_PLTGOT:
|
||||
case DT_HASH:
|
||||
@ -235,11 +236,12 @@ template <class S> class dynamic_section_accessor_template
|
||||
case DT_FINI_ARRAY:
|
||||
case DT_PREINIT_ARRAY:
|
||||
default:
|
||||
entry.d_un.d_ptr = convertor( value );
|
||||
entry.d_un.d_ptr =
|
||||
convertor( decltype( entry.d_un.d_val )( value ) );
|
||||
break;
|
||||
}
|
||||
|
||||
entry.d_tag = convertor( tag );
|
||||
entry.d_tag = convertor( decltype( entry.d_tag )( tag ) );
|
||||
|
||||
dynamic_section->append_data( reinterpret_cast<char*>( &entry ),
|
||||
sizeof( entry ) );
|
||||
|
@ -33,7 +33,8 @@ template <class S> class versym_section_accessor_template
|
||||
versym_section_accessor_template( S* section ) : versym_section( section )
|
||||
{
|
||||
if ( section ) {
|
||||
entries_num = section->get_size() / sizeof( Elf_Half );
|
||||
entries_num = decltype( entries_num )( section->get_size() /
|
||||
sizeof( Elf_Half ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,7 +119,7 @@ template <class S> class versym_r_section_accessor_template
|
||||
|
||||
if ( dynamic_section_acc.get_entry( i, tag, value, str ) &&
|
||||
tag == DT_VERNEEDNUM ) {
|
||||
entries_num = value;
|
||||
entries_num = (Elf_Word)value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ TEST( ELFIOTest, gnu_version_64_le )
|
||||
section* gnu_version = reader.sections[".gnu.version"];
|
||||
const_versym_section_accessor gnu_version_arr( gnu_version );
|
||||
|
||||
section* gnu_version_r = reader.sections[".gnu.version_r"];
|
||||
const section* gnu_version_r = reader.sections[".gnu.version_r"];
|
||||
const_versym_r_section_accessor gnu_version_r_arr( reader, gnu_version_r );
|
||||
|
||||
section* dynstr = reader.sections[".dynstr"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user