From b501c42d27c15bbee0d352dc7147c947013e3669 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Wed, 17 Jan 2024 09:51:29 +0200 Subject: [PATCH] Fix compiler warnings * Remove pointless #define _GNU_SOURCE. It is already defined by gyp, and defining it after all the includes does nothing anyway. * unary minus operator applied to unsigned type, result still unsigned --- src/isolate/allocator_nortti.cc | 2 +- src/isolate/environment.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/isolate/allocator_nortti.cc b/src/isolate/allocator_nortti.cc index c225089..0415474 100644 --- a/src/isolate/allocator_nortti.cc +++ b/src/isolate/allocator_nortti.cc @@ -21,7 +21,7 @@ class ExternalMemoryHandle { ~ExternalMemoryHandle() { auto* allocator = IsolateEnvironment::GetCurrent().GetLimitedAllocator(); if (allocator != nullptr) { - allocator->AdjustAllocatedSize(-size); + allocator->AdjustAllocatedSize(-static_cast(size)); } }; diff --git a/src/isolate/environment.cc b/src/isolate/environment.cc index c6bd9f1..396ab89 100644 --- a/src/isolate/environment.cc +++ b/src/isolate/environment.cc @@ -55,7 +55,6 @@ static auto GetStackBase() -> void* { return base; } #elif defined __unix__ -#define _GNU_SOURCE static auto GetStackBase() -> void* { pthread_t self = pthread_self(); pthread_attr_t attrs;