mirror of
https://github.com/serge1/ELFIO.git
synced 2025-04-17 08:44:25 +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
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
ctest -VV -C ${{ matrix.build_type }}
|
ctest -C ${{ matrix.build_type }}
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -201,7 +201,7 @@ template <class S> class dynamic_section_accessor_template
|
|||||||
case DT_SYMBOLIC:
|
case DT_SYMBOLIC:
|
||||||
case DT_TEXTREL:
|
case DT_TEXTREL:
|
||||||
case DT_BIND_NOW:
|
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;
|
break;
|
||||||
case DT_NEEDED:
|
case DT_NEEDED:
|
||||||
case DT_PLTRELSZ:
|
case DT_PLTRELSZ:
|
||||||
@ -219,7 +219,8 @@ template <class S> class dynamic_section_accessor_template
|
|||||||
case DT_RUNPATH:
|
case DT_RUNPATH:
|
||||||
case DT_FLAGS:
|
case DT_FLAGS:
|
||||||
case DT_PREINIT_ARRAYSZ:
|
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;
|
break;
|
||||||
case DT_PLTGOT:
|
case DT_PLTGOT:
|
||||||
case DT_HASH:
|
case DT_HASH:
|
||||||
@ -235,11 +236,12 @@ template <class S> class dynamic_section_accessor_template
|
|||||||
case DT_FINI_ARRAY:
|
case DT_FINI_ARRAY:
|
||||||
case DT_PREINIT_ARRAY:
|
case DT_PREINIT_ARRAY:
|
||||||
default:
|
default:
|
||||||
entry.d_un.d_ptr = convertor( value );
|
entry.d_un.d_ptr =
|
||||||
|
convertor( decltype( entry.d_un.d_val )( value ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry.d_tag = convertor( tag );
|
entry.d_tag = convertor( decltype( entry.d_tag )( tag ) );
|
||||||
|
|
||||||
dynamic_section->append_data( reinterpret_cast<char*>( &entry ),
|
dynamic_section->append_data( reinterpret_cast<char*>( &entry ),
|
||||||
sizeof( entry ) );
|
sizeof( entry ) );
|
||||||
|
@ -33,7 +33,8 @@ template <class S> class versym_section_accessor_template
|
|||||||
versym_section_accessor_template( S* section ) : versym_section( section )
|
versym_section_accessor_template( S* section ) : versym_section( section )
|
||||||
{
|
{
|
||||||
if ( 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 ) &&
|
if ( dynamic_section_acc.get_entry( i, tag, value, str ) &&
|
||||||
tag == DT_VERNEEDNUM ) {
|
tag == DT_VERNEEDNUM ) {
|
||||||
entries_num = value;
|
entries_num = (Elf_Word)value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -374,7 +374,7 @@ TEST( ELFIOTest, gnu_version_64_le )
|
|||||||
section* gnu_version = reader.sections[".gnu.version"];
|
section* gnu_version = reader.sections[".gnu.version"];
|
||||||
const_versym_section_accessor gnu_version_arr( 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 );
|
const_versym_r_section_accessor gnu_version_r_arr( reader, gnu_version_r );
|
||||||
|
|
||||||
section* dynstr = reader.sections[".dynstr"];
|
section* dynstr = reader.sections[".dynstr"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user