Fix sign-compare error

I just noticed that on my compiler;
probably due to recent version, not sure.
This commit is contained in:
Kamay Xutax 2022-07-18 00:28:43 +02:00 committed by Serge Lamikhov-Center
parent 92658df379
commit 7227a0913f
2 changed files with 2 additions and 2 deletions

View File

@ -226,7 +226,7 @@ template <class T> class section_impl : public section
stream.seekg(
( *translator )[( *convertor )( header.sh_offset )] );
stream.read( data, size );
if (stream.gcount() != size) {
if (static_cast<Elf_Xword>(stream.gcount()) != size) {
delete[] data;
data = nullptr;
return false;

View File

@ -185,7 +185,7 @@ template <class T> class segment_impl : public segment
if ( nullptr != data ) {
stream.read( data, size );
if (stream.gcount() != size) {
if (static_cast<Elf_Xword>(stream.gcount()) != size) {
delete[] data;
data = nullptr;
return false;