X Tutup
Skip to content

Commit 6fdadb4

Browse files
committed
Fix C4305 warnings on Windows with Cython 0.28.4 (cztomczak#250)
1 parent 18c8735 commit 6fdadb4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/cython_setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,18 @@ def set_compiler_options(options):
151151
# function "public: virtual bool __thiscall
152152
# ClientHandler::OnProcessMessageReceived
153153
#
154+
# /wd4305 - disable warnnings such as this:
155+
#
156+
# warning C4305: '=' : truncation from 'int' to 'bool'
157+
# Code: > cdef public cpp_bool ExecutePythonCallback(...) except *:
158+
# > return True
159+
# Discussed on cython group error 4800 which is similar to this,
160+
# but there is no other way to fix this warning:
161+
# https://groups.google.com/d/topic/cython-users/X_X0lfIBCqo/discussion
162+
#
154163
# The above warning LNK4217 is caused by the warning below which occurs
155164
# when building the client_handler.lib static library:
156-
extra_compile_args.extend(["/EHsc"])
165+
extra_compile_args.extend(["/EHsc", "/wd4305"])
157166
extra_link_args.extend(["/ignore:4217"])
158167

159168
if LINUX or MAC:

0 commit comments

Comments
 (0)
X Tutup