Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
orgads committed Jan 21, 2024
1 parent fc9d899 commit b501c42
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/isolate/allocator_nortti.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ExternalMemoryHandle {
~ExternalMemoryHandle() {
auto* allocator = IsolateEnvironment::GetCurrent().GetLimitedAllocator();
if (allocator != nullptr) {
allocator->AdjustAllocatedSize(-size);
allocator->AdjustAllocatedSize(-static_cast<ptrdiff_t>(size));
}
};

Expand Down
1 change: 0 additions & 1 deletion src/isolate/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b501c42

Please sign in to comment.