0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

src: fix ignore GCC -Wcast-function-type for older compilers

Fixes: https://github.com/nodejs/node/issues/31517

PR-URL: https://github.com/nodejs/node/pull/31524
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Denys Otrishko 2020-01-26 17:59:51 +02:00 committed by Rich Trott
parent b851d7b986
commit 2462a2c5d7
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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