Squelch PortAudio warnings on Windows x64 cmake build

pa_win_wmme.c generates 4 warnings due to converting size_t down to a long
All 4 get the size_t from a strlen() call on a device path so are unlikely
to exceed a long.

Change-Id: I1d768b96abf42514149db067b24c98d0b9bdfaed
Reviewed-on: https://code.wireshark.org/review/8893
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
This commit is contained in:
Graham Bloice 2015-06-11 19:54:23 +01:00
parent db686d82ac
commit 91ed2b0b63
1 changed files with 12 additions and 0 deletions

View File

@ -157,6 +157,7 @@ if(PORTAUDIO_FOUND)
set_target_properties(portaudio PROPERTIES
INCLUDE_DIRECTORIES "${PORTAUDIO_INCLUDE_DIRS}"
FOLDER "UI")
# Portaudio has some warnings, annoyingly the combination of CMake
# and MSBuild means that just disabling the warnings on the specific
# source files doesn't work, so set them to level 4 for the target
@ -172,6 +173,17 @@ if(PORTAUDIO_FOUND)
PUBLIC "/w44189"
PUBLIC "/w44305"
)
# Portaudio has some size_t > long warnings as a result of using strlen() on x64.
if (WIRESHARK_TARGET_PLATFORM STREQUAL "win64")
#set_source_files_properties(${PORTAUDIO_SRC_DIR}/hostapi/wmme/pa_win_wmme.c
# PROPERTIES
# COMPILE_FLAGS "/wd4267"
#)
target_compile_options(portaudio
PUBLIC "/w44267"
)
endif()
endif()
endif()