From f8934c09ffbf2da33fdee16b187f3b15e0948bf1 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Thu, 9 Mar 2023 12:00:56 -0800 Subject: [PATCH] F*ck MSVC warning C4245: 'return': conversion from 'int' to 'unsigned int', signed/unsigned mismatch return ~0; // in function declared as returning 'unsigned'. The bits are the same! modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 2fd75f27..32fb1803 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -1961,7 +1961,7 @@ unsigned PackLinuxElf32::elf_find_table_size(unsigned dt_type, unsigned sh_type) if (~0u != y_ndx) { return dt_offsets[1+ y_ndx] - dt_offsets[y_ndx]; } - return ~0; + return ~0u; } void @@ -7187,7 +7187,7 @@ unsigned PackLinuxElf64::elf_find_table_size(unsigned dt_type, unsigned sh_type) if (~0u != y_ndx) { return dt_offsets[1+ y_ndx] - dt_offsets[y_ndx]; } - return ~0; + return ~0u; } void