Skip to content

Commit 0bed66f

Browse files
committed
Suppress C4101 and C4996 in libxc C sources for cl.exe
C4101: unreferenced local variable in hyb_gga_x_cam_s12.c C4996: sprintf deprecation in xc-threshold.c — _CRT_SECURE_NO_WARNINGS alone is insufficient when the consumer sets /w14996
1 parent a1088e8 commit 0bed66f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ else()
116116
# Suppress warnings in auto-generated and upstream libxc C sources (cl.exe)
117117
target_compile_options( xc PRIVATE
118118
/wd4100 # unreferenced formal parameter
119+
/wd4101 # unreferenced local variable
119120
/wd4146 # unary minus on unsigned type
120121
/wd4244 # conversion with possible loss of data (long double to double)
121122
/wd4267 # conversion from size_t to int, possible loss of data
122123
/wd4701 # potentially uninitialized local variable used
123124
/wd4703 # potentially uninitialized local pointer variable used
125+
/wd4996 # deprecated function (sprintf) — _CRT_SECURE_NO_WARNINGS alone is not enough when /w14996 is set by the consumer
124126
)
125127
endif()
126128
endif()

0 commit comments

Comments
 (0)