From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 6 Mar 2025 19:31:29 -0600 Subject: fix: -Wnonnull warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes this warning: > 2025-03-07T01:05:01.8637705Z ../../third_party/electron_node/src/debug_utils.cc(257,12): error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull] > 2025-03-07T01:05:01.8638267Z 257 | return nullptr; > 2025-03-07T01:05:01.8638481Z | ^~~~~~~ > 2025-03-07T01:05:01.8638700Z 1 error generated. Not sure why this warning was never triggered before; `git blame` indicates this code hasn't changed in ages: > c40a8273ef2 (Michaƫl Zasso 2024-05-10 09:50:20 +0200 255) #endif // DEBUG > 8e2d33f1562 (Anna Henningsen 2018-06-07 16:54:29 +0200 256) } > 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 257) return nullptr; > 247b5130595 (Refael Ackermann 2018-10-22 15:07:00 -0400 258) } Presumably this is failing in this Chromium roll due to a clang version bump. We should remove this patch after upstreaming it. Upstream PR: https://github.com/nodejs/node/pull/57354 diff --git a/src/debug_utils.cc b/src/debug_utils.cc index c8b3b11ee34d7ac98163aa563fd7f6f1fb0a3b79..8a85e066fd9e6f3d6131eca89d52495f904cd5a6 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -254,7 +254,7 @@ class Win32SymbolDebuggingContext final : public NativeSymbolDebuggingContext { USE(GetLastError()); #endif // DEBUG } - return nullptr; + return {}; } SymbolInfo LookupSymbol(void* address) override {