Skip to content

Commit d77a05d

Browse files
authored
Mitigate compiler warnings (#1385)
This PR narrows the Node.js header inclusion in the native bindings to only pull in version macros, which helps mitigate compiler warnings from unnecessary Node C++ API exposure. **Changes:** - Replace the broad `<node.h>` include with the more targeted `<node_version.h>` in `rcl_bindings.cpp`. - Continue to use `NODE_MAJOR_VERSION`, `NODE_RUNTIME_ELECTRON`, and `NODE_MODULE_VERSION` macros via the new header to guard behavior in `CreateArrayBufferFromAddress`. Fix: #1385
1 parent e465abd commit d77a05d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rcl_bindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#include "rcl_bindings.h"
1616

17-
#include <node.h>
17+
#include <node_version.h>
1818
#include <rcl/arguments.h>
1919
#include <rcl/rcl.h>
2020

0 commit comments

Comments
 (0)