From 515625c3b0fe16d53ba5b61d2ea050abe19d66b1 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Fri, 15 Nov 2019 10:47:19 -0500 Subject: [PATCH] [Runtime] Enable the -Wsign-conversion on trampolines-x86_64.m files. Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: https://github.com/xamarin/xamarin-macios/pull/7405 --- runtime/trampolines-x86_64.m | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/runtime/trampolines-x86_64.m b/runtime/trampolines-x86_64.m index f98a52c99c9f..78fcc47dd200 100644 --- a/runtime/trampolines-x86_64.m +++ b/runtime/trampolines-x86_64.m @@ -1,8 +1,3 @@ - -// TODO: temp ignore to minimize diff -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wsign-conversion" - #if defined(__x86_64__) #include @@ -126,13 +121,13 @@ unsigned long register_size = 48; // 48 == 6 registers * 8 bytes if ((unsigned long)it->byte_count >= register_size) { read_register = false; - } else if (register_size - it->byte_count < total_size) { + } else if (register_size - (unsigned long)it->byte_count < total_size) { read_register = false; LOGZ (" total size (%i) is less that available register size (%i)", (int) total_size, register_size - it->byte_count); } if (read_register) { - if (it->byte_count / 8 != (it->byte_count + size - 1) / 8) { + if (it->byte_count / 8 != ((unsigned long) it->byte_count + size - 1) / 8) { // align to next register if the one we're currently reading // doesn't contain the entire value we need. it->byte_count += 8 - it->byte_count % 8; @@ -497,6 +492,4 @@ dump_state (state); } -#endif /* __x86_64__ */ - -#pragma clang diagnostic pop \ No newline at end of file +#endif /* __x86_64__ */ \ No newline at end of file