mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Silence noisy (and useless) MSVC warnings
This commit is contained in:
parent
d6b4c7d24f
commit
5765855089
3 changed files with 23 additions and 0 deletions
|
@ -52,6 +52,21 @@ if(MSVC)
|
|||
xcheck_add_c_compiler_flag(-Wno-reserved-identifier)
|
||||
xcheck_add_c_compiler_flag(-Wdeprecated-declarations)
|
||||
xcheck_add_c_compiler_flag(/experimental:c11atomics)
|
||||
xcheck_add_c_compiler_flag(/wd4018) # -Wno-sign-conversion
|
||||
xcheck_add_c_compiler_flag(/wd4061) # -Wno-implicit-fallthrough
|
||||
xcheck_add_c_compiler_flag(/wd4100) # -Wno-unused-parameter
|
||||
xcheck_add_c_compiler_flag(/wd4200) # -Wno-zero-length-array
|
||||
xcheck_add_c_compiler_flag(/wd4242) # -Wno-shorten-64-to-32
|
||||
xcheck_add_c_compiler_flag(/wd4244) # -Wno-shorten-64-to-32
|
||||
xcheck_add_c_compiler_flag(/wd4245) # -Wno-sign-compare
|
||||
xcheck_add_c_compiler_flag(/wd4267) # -Wno-shorten-64-to-32
|
||||
xcheck_add_c_compiler_flag(/wd4388) # -Wno-sign-compare
|
||||
xcheck_add_c_compiler_flag(/wd4389) # -Wno-sign-compare
|
||||
xcheck_add_c_compiler_flag(/wd4710) # Function not inlined
|
||||
xcheck_add_c_compiler_flag(/wd4711) # Function was inlined
|
||||
xcheck_add_c_compiler_flag(/wd4820) # Padding added after construct
|
||||
xcheck_add_c_compiler_flag(/wd4996) # -Wdeprecated-declarations
|
||||
xcheck_add_c_compiler_flag(/wd5045) # Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
|
||||
endif()
|
||||
|
||||
# MacOS and GCC 11 or later need -Wno-maybe-uninitialized
|
||||
|
|
4
cutils.c
4
cutils.c
|
@ -37,7 +37,9 @@
|
|||
#undef NANOSEC
|
||||
#define NANOSEC ((uint64_t) 1e9)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility push(default)
|
||||
#endif
|
||||
|
||||
void pstrcpy(char *buf, int buf_size, const char *str)
|
||||
{
|
||||
|
@ -1404,4 +1406,6 @@ int js_cond_timedwait(js_cond_t *cond, js_mutex_t *mutex, uint64_t timeout) {
|
|||
|
||||
#endif /* !defined(EMSCRIPTEN) && !defined(__wasi__) */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC visibility pop
|
||||
#endif
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
#define CONFIG_ATOMICS
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __extension__
|
||||
#endif
|
||||
|
||||
// Debug trace system: the debug output will be produced to the dump stream (currently
|
||||
// stdout) if qjs is invoked with -D<bitmask> with the corresponding bit set.
|
||||
|
||||
|
|
Loading…
Reference in a new issue