Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b4a79ac

Browse filesBrowse files
refacktargos
authored andcommitted
build,win: exclude warning 4244 only for deps
* also unify warning exclusion directive PR-URL: #22698 Reviewed-By: João Reis <reis@janeasystems.com>
1 parent dbe27d7 commit b4a79ac
Copy full SHA for b4a79ac

File tree

Expand file treeCollapse file tree

2 files changed

+24
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+24
-13
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+14-13Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,6 @@
264264
'BufferSecurityCheck': 'true',
265265
'ExceptionHandling': 0, # /EHsc
266266
'SuppressStartupBanner': 'true',
267-
# Disable warnings:
268-
# - "C4251: class needs to have dll-interface"
269-
# - "C4275: non-DLL-interface used as base for DLL-interface"
270-
# Over 10k of these warnings are generated when compiling node,
271-
# originating from v8.h. Most of them are false positives.
272-
# See also: https://github.com/nodejs/node/pull/15570
273-
# TODO: re-enable when Visual Studio fixes these upstream.
274-
#
275-
# - "C4267: conversion from 'size_t' to 'int'"
276-
# Many any originate from our dependencies, and their sheer number
277-
# drowns out other, more legitimate warnings.
278-
'DisableSpecificWarnings': ['4251', '4275', '4267'],
279267
'WarnAsError': 'false',
280268
},
281269
'VCLinkerTool': {
@@ -306,7 +294,20 @@
306294
'SuppressStartupBanner': 'true',
307295
},
308296
},
309-
'msvs_disabled_warnings': [4351, 4355, 4800],
297+
# Disable warnings:
298+
# - "C4251: class needs to have dll-interface"
299+
# - "C4275: non-DLL-interface used as base for DLL-interface"
300+
# Over 10k of these warnings are generated when compiling node,
301+
# originating from v8.h. Most of them are false positives.
302+
# See also: https://github.com/nodejs/node/pull/15570
303+
# TODO: re-enable when Visual Studio fixes these upstream.
304+
#
305+
# - "C4267: conversion from 'size_t' to 'int'"
306+
# Many any originate from our dependencies, and their sheer number
307+
# drowns out other, more legitimate warnings.
308+
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
309+
# Ususaly safe. Disable for `dep`, enable for `src`
310+
'msvs_disabled_warnings': [4351, 4355, 4800, 4251, 4275, 4244, 4267],
310311
'conditions': [
311312
['asan == 1 and OS != "mac"', {
312313
'cflags+': [
Collapse file

‎node.gyp‎

Copy file name to clipboardExpand all lines: node.gyp
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@
238238
'src',
239239
'deps/v8/include',
240240
],
241+
242+
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
243+
# Ususaly safe. Disable for `dep`, enable for `src`
244+
'msvs_disabled_warnings!': [4244],
245+
241246
'conditions': [
242247
[ 'node_intermediate_lib_type=="static_library" and '
243248
'node_shared=="true" and OS=="aix"', {
@@ -471,6 +476,11 @@
471476
'V8_DEPRECATION_WARNINGS=1',
472477
'NODE_OPENSSL_SYSTEM_CERT_PATH="<(openssl_system_ca_path)"',
473478
],
479+
480+
# - "C4244: conversion from 'type1' to 'type2', possible loss of data"
481+
# Ususaly safe. Disable for `dep`, enable for `src`
482+
'msvs_disabled_warnings!': [4244],
483+
474484
'conditions': [
475485
[ 'node_code_cache_path!=""', {
476486
'sources': [ '<(node_code_cache_path)' ]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.