File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,18 @@ def build_extension(self, ext):
129129 if isinstance (self .compiler , MSVCCompiler ) or getattr (self .compiler , 'compiler_type' , '' ) == 'msvc' :
130130 # set flags only available when using MSVC
131131 ext .extra_link_args .append ('/MANIFEST' )
132+ # conversion from '__int64' to 'Py_ssize_t', possible loss of data
133+ ext .extra_compile_args .append ('/we4244' )
134+ # conversion from 'size_t' to 'int', possible loss of data
135+ ext .extra_compile_args .append ('/we4267' )
132136 if COMPILE_DEBUG :
133137 ext .extra_compile_args .append ('/Zi' )
134138 ext .extra_compile_args .append ('/MTd' )
135139 ext .extra_link_args .append ('/DEBUG' )
136140 else :
137141 ext .extra_compile_args .append ('/MT' )
142+ else :
143+ ext .extra_compile_args .append ('-Werror=sign-compare' )
138144
139145 _build_ext .build_extension (self , ext )
140146
You can’t perform that action at this time.
0 commit comments