Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
src: fix ignore GCC -Wcast-function-type for older compilers
Fixes: #31517
  • Loading branch information
lundibundi committed Jan 26, 2020
commit 66acda9a8c492144f5480987447252a204f9688a
4 changes: 2 additions & 2 deletions src/base_object-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#include "env-inl.h"
#include "util.h"

#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
#include "v8.h"
#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

Expand Down
5 changes: 3 additions & 2 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@
# define SIGKILL 9
#endif

#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
#include "v8.h" // NOLINT(build/include_order)
#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

#include "v8-platform.h" // NOLINT(build/include_order)
#include "node_version.h" // NODE_MODULE_VERSION

Expand Down
4 changes: 2 additions & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
#include "v8.h"
#if defined(__GNUC__) && !defined(__clang__)
#if (__GNUC__ >= 8) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

Expand Down