diff options
25 files changed, 121 insertions, 30 deletions
diff --git a/build/common.gypi b/build/common.gypi index a460a1d2..3bcf782e 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -221,12 +221,12 @@ 'WEBRTC_WIN', ], # TODO(andrew): enable all warnings when possible. - # 4389: Signed/unsigned mismatch. - # 4373: MSVC legacy warning for ignoring const / volatile in - # signatures. TODO(phoglund): get rid of 4373 supression when + # TODO(phoglund): get rid of 4373 supression when # http://code.google.com/p/webrtc/issues/detail?id=261 is solved. - 'msvs_disabled_warnings': [4389, 4373], - + 'msvs_disabled_warnings': [ + 4373, # legacy warning for ignoring const / volatile in signatures. + 4389, # Signed/unsigned mismatch. + ], # Re-enable some warnings that Chromium disables. 'msvs_disabled_warnings!': [4189,], }], diff --git a/common_video/common_video.gyp b/common_video/common_video.gyp index 36e2ee5b..05ddd9d1 100644 --- a/common_video/common_video.gyp +++ b/common_video/common_video.gyp @@ -89,6 +89,10 @@ 'libyuv/scaler_unittest.cc', 'plane_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets }], # include_tests diff --git a/modules/audio_coding/codecs/isac/isacfix_test.gypi b/modules/audio_coding/codecs/isac/isacfix_test.gypi index ce2f46c0..4bac161d 100644 --- a/modules/audio_coding/codecs/isac/isacfix_test.gypi +++ b/modules/audio_coding/codecs/isac/isacfix_test.gypi @@ -23,6 +23,10 @@ 'sources': [ './fix/test/kenny.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], } diff --git a/modules/audio_coding/main/source/audio_coding_module.gypi b/modules/audio_coding/main/source/audio_coding_module.gypi index 3de7805c..aba15eff 100644 --- a/modules/audio_coding/main/source/audio_coding_module.gypi +++ b/modules/audio_coding/main/source/audio_coding_module.gypi @@ -211,6 +211,10 @@ '../../neteq4/mock/mock_packet_buffer.h', '../../neteq4/mock/mock_payload_splitter.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # audio_coding_unittests ], }], diff --git a/modules/audio_coding/neteq/neteq.gypi b/modules/audio_coding/neteq/neteq.gypi index 371a6dae..fcdb1b59 100644 --- a/modules/audio_coding/neteq/neteq.gypi +++ b/modules/audio_coding/neteq/neteq.gypi @@ -99,6 +99,10 @@ 'sources': [ 'webrtc_neteq_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # neteq_unittests { 'target_name': 'NetEqRTPplay', @@ -137,6 +141,10 @@ 'sources': [ 'test/NetEqRTPplay.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, { @@ -193,6 +201,10 @@ 'test/NETEQTEST_RTPpacket.cc', 'test/NETEQTEST_RTPpacket.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets }], # include_tests diff --git a/modules/audio_coding/neteq4/neteq.gypi b/modules/audio_coding/neteq4/neteq.gypi index d6d4fee1..5f8ad0a8 100644 --- a/modules/audio_coding/neteq4/neteq.gypi +++ b/modules/audio_coding/neteq4/neteq.gypi @@ -113,6 +113,10 @@ 'time_stretch.cc', 'time_stretch.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets 'conditions': [ @@ -144,7 +148,11 @@ 'audio_decoder.cc', 'interface/audio_decoder.h', ], - }, # audio_decoder_unittest + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], + }, # audio_decoder_unittests { 'target_name': 'neteq_unittest_tools', @@ -168,6 +176,10 @@ 'tools/rtp_generator.cc', 'tools/rtp_generator.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # neteq_unittest_tools ], # targets }], # include_tests diff --git a/modules/audio_coding/neteq4/neteq_tests.gypi b/modules/audio_coding/neteq4/neteq_tests.gypi index aa85f741..4a9d6436 100644 --- a/modules/audio_coding/neteq4/neteq_tests.gypi +++ b/modules/audio_coding/neteq4/neteq_tests.gypi @@ -60,6 +60,10 @@ 'sources': [ 'test/RTPencode.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, { @@ -168,6 +172,10 @@ 'test/NETEQTEST_RTPpacket.cc', 'test/NETEQTEST_RTPpacket.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets } diff --git a/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi b/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi index 4ca68198..5bfb77ac 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi +++ b/modules/rtp_rtcp/source/rtp_rtcp_tests.gypi @@ -45,6 +45,10 @@ 'rtcp_receiver_unittest.cc', 'vp8_partition_aggregator_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], } diff --git a/modules/udp_transport/source/udp_transport.gypi b/modules/udp_transport/source/udp_transport.gypi index 92ade750..a73a5873 100644 --- a/modules/udp_transport/source/udp_transport.gypi +++ b/modules/udp_transport/source/udp_transport.gypi @@ -97,6 +97,10 @@ 'udp_socket_manager_unittest.cc', 'udp_socket_wrapper_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # udp_transport_unittests ], # targets }], # include_tests diff --git a/modules/video_coding/codecs/tools/video_codecs_tools.gypi b/modules/video_coding/codecs/tools/video_codecs_tools.gypi index 02ac465b..6fe76f75 100644 --- a/modules/video_coding/codecs/tools/video_codecs_tools.gypi +++ b/modules/video_coding/codecs/tools/video_codecs_tools.gypi @@ -19,10 +19,14 @@ '<(DEPTH)/third_party/google-gflags/google-gflags.gyp:google-gflags', '<(webrtc_root)/test/metrics.gyp:metrics', '<(webrtc_vp8_dir)/vp8.gyp:webrtc_vp8', - ], - 'sources': [ - 'video_quality_measurement.cc', - ], + ], + 'sources': [ + 'video_quality_measurement.cc', + ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets }], # include_tests diff --git a/modules/video_coding/codecs/vp8/vp8.gyp b/modules/video_coding/codecs/vp8/vp8.gyp index 196de43d..a53ea29d 100644 --- a/modules/video_coding/codecs/vp8/vp8.gyp +++ b/modules/video_coding/codecs/vp8/vp8.gyp @@ -73,6 +73,10 @@ 'include/vp8_common_types.h', 'vp8_impl.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets 'conditions': [ diff --git a/modules/video_coding/main/source/video_coding_test.gypi b/modules/video_coding/main/source/video_coding_test.gypi index 25f82c61..b453c57a 100644 --- a/modules/video_coding/main/source/video_coding_test.gypi +++ b/modules/video_coding/main/source/video_coding_test.gypi @@ -93,6 +93,10 @@ '../../codecs/test/stats_unittest.cc', '../../codecs/test/videoprocessor_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], } diff --git a/system_wrappers/source/system_wrappers.gyp b/system_wrappers/source/system_wrappers.gyp index b0903b2d..71da723a 100644 --- a/system_wrappers/source/system_wrappers.gyp +++ b/system_wrappers/source/system_wrappers.gyp @@ -187,8 +187,11 @@ ], }], ], - # Ignore warning on shift operator promotion. - 'msvs_disabled_warnings': [ 4334, ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + 4334, # Ignore warning on shift operator promotion. + ], }, ], # targets 'conditions': [ @@ -270,6 +273,10 @@ 'sources!': [ 'thread_posix_unittest.cc', ], }], ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], # targets }], # include_tests diff --git a/test/testsupport/frame_reader.cc b/test/testsupport/frame_reader.cc index b05ea584..8fea9f33 100644 --- a/test/testsupport/frame_reader.cc +++ b/test/testsupport/frame_reader.cc @@ -30,7 +30,7 @@ FrameReaderImpl::~FrameReaderImpl() { bool FrameReaderImpl::Init() { if (frame_length_in_bytes_ <= 0) { - fprintf(stderr, "Frame length must be >0, was %d\n", + fprintf(stderr, "Frame length must be >0, was %zu\n", frame_length_in_bytes_); return false; } @@ -46,7 +46,8 @@ bool FrameReaderImpl::Init() { fprintf(stderr, "Found empty file: %s\n", input_filename_.c_str()); return false; } - number_of_frames_ = source_file_size / frame_length_in_bytes_; + number_of_frames_ = static_cast<int>(source_file_size / + frame_length_in_bytes_); return true; } diff --git a/test/testsupport/frame_reader.h b/test/testsupport/frame_reader.h index 56d8fc47..831f58f6 100644 --- a/test/testsupport/frame_reader.h +++ b/test/testsupport/frame_reader.h @@ -40,7 +40,7 @@ class FrameReader { virtual void Close() = 0; // Frame length in bytes of a single frame image. - virtual int FrameLength() = 0; + virtual size_t FrameLength() = 0; // Total number of frames in the input video source. virtual int NumberOfFrames() = 0; }; @@ -57,12 +57,12 @@ class FrameReaderImpl : public FrameReader { bool Init(); bool ReadFrame(WebRtc_UWord8* source_buffer); void Close(); - int FrameLength() { return frame_length_in_bytes_; } + size_t FrameLength() { return frame_length_in_bytes_; } int NumberOfFrames() { return number_of_frames_; } private: std::string input_filename_; - int frame_length_in_bytes_; + size_t frame_length_in_bytes_; int number_of_frames_; FILE* input_file_; }; diff --git a/test/testsupport/frame_reader_unittest.cc b/test/testsupport/frame_reader_unittest.cc index f1da5ce8..dadeaff6 100644 --- a/test/testsupport/frame_reader_unittest.cc +++ b/test/testsupport/frame_reader_unittest.cc @@ -20,7 +20,7 @@ const std::string kInputFilename = "temp_inputfile.tmp"; const std::string kInputFileContents = "baz"; // Setting the kFrameLength value to a value much larger than the // file to test causes the ReadFrame test to fail on Windows. -const int kFrameLength = 1000; +const size_t kFrameLength = 1000; class FrameReaderTest: public testing::Test { protected: diff --git a/test/testsupport/frame_writer.cc b/test/testsupport/frame_writer.cc index 5f325394..3d5a1091 100644 --- a/test/testsupport/frame_writer.cc +++ b/test/testsupport/frame_writer.cc @@ -28,7 +28,7 @@ FrameWriterImpl::~FrameWriterImpl() { bool FrameWriterImpl::Init() { if (frame_length_in_bytes_ <= 0) { - fprintf(stderr, "Frame length must be >0, was %d\n", + fprintf(stderr, "Frame length must be >0, was %zu\n", frame_length_in_bytes_); return false; } @@ -54,10 +54,10 @@ bool FrameWriterImpl::WriteFrame(WebRtc_UWord8* frame_buffer) { fprintf(stderr, "FrameWriter is not initialized (output file is NULL)\n"); return false; } - int bytes_written = fwrite(frame_buffer, 1, frame_length_in_bytes_, - output_file_); + size_t bytes_written = fwrite(frame_buffer, 1, frame_length_in_bytes_, + output_file_); if (bytes_written != frame_length_in_bytes_) { - fprintf(stderr, "Failed to write %d bytes to file %s\n", + fprintf(stderr, "Failed to write %zu bytes to file %s\n", frame_length_in_bytes_, output_filename_.c_str()); return false; } diff --git a/test/testsupport/frame_writer.h b/test/testsupport/frame_writer.h index e91a2992..4df4ffea 100644 --- a/test/testsupport/frame_writer.h +++ b/test/testsupport/frame_writer.h @@ -38,7 +38,7 @@ class FrameWriter { virtual void Close() = 0; // Frame length in bytes of a single frame image. - virtual int FrameLength() = 0; + virtual size_t FrameLength() = 0; }; class FrameWriterImpl : public FrameWriter { @@ -55,11 +55,11 @@ class FrameWriterImpl : public FrameWriter { bool Init(); bool WriteFrame(WebRtc_UWord8* frame_buffer); void Close(); - int FrameLength() { return frame_length_in_bytes_; } + size_t FrameLength() { return frame_length_in_bytes_; } private: std::string output_filename_; - int frame_length_in_bytes_; + size_t frame_length_in_bytes_; FILE* output_file_; }; diff --git a/test/testsupport/frame_writer_unittest.cc b/test/testsupport/frame_writer_unittest.cc index d25d1d26..52185dda 100644 --- a/test/testsupport/frame_writer_unittest.cc +++ b/test/testsupport/frame_writer_unittest.cc @@ -17,7 +17,7 @@ namespace webrtc { namespace test { const std::string kOutputFilename = "temp_outputfile.tmp"; -const int kFrameLength = 1000; +const size_t kFrameLength = 1000; class FrameWriterTest: public testing::Test { protected: @@ -50,8 +50,7 @@ TEST_F(FrameWriterTest, WriteFrame) { ASSERT_TRUE(result); // success // Close the file and verify the size. frame_writer_->Close(); - ASSERT_EQ(kFrameLength, - static_cast<int>(GetFileSize(kOutputFilename))); + ASSERT_EQ(kFrameLength, GetFileSize(kOutputFilename)); } TEST_F(FrameWriterTest, WriteFrameUninitialized) { diff --git a/test/testsupport/mock/mock_frame_reader.h b/test/testsupport/mock/mock_frame_reader.h index ecfc13c0..f22dcd1a 100644 --- a/test/testsupport/mock/mock_frame_reader.h +++ b/test/testsupport/mock/mock_frame_reader.h @@ -23,7 +23,7 @@ class MockFrameReader : public FrameReader { MOCK_METHOD0(Init, bool()); MOCK_METHOD1(ReadFrame, bool(WebRtc_UWord8* source_buffer)); MOCK_METHOD0(Close, void()); - MOCK_METHOD0(FrameLength, int()); + MOCK_METHOD0(FrameLength, size_t()); MOCK_METHOD0(NumberOfFrames, int()); }; diff --git a/test/testsupport/mock/mock_frame_writer.h b/test/testsupport/mock/mock_frame_writer.h index ba791846..89650c95 100644 --- a/test/testsupport/mock/mock_frame_writer.h +++ b/test/testsupport/mock/mock_frame_writer.h @@ -23,7 +23,7 @@ class MockFrameWriter : public FrameWriter { MOCK_METHOD0(Init, bool()); MOCK_METHOD1(WriteFrame, bool(WebRtc_UWord8* frame_buffer)); MOCK_METHOD0(Close, void()); - MOCK_METHOD0(FrameLength, int()); + MOCK_METHOD0(FrameLength, size_t()); }; } // namespace test diff --git a/tools/tools.gyp b/tools/tools.gyp index 48949edf..3a6787e2 100644 --- a/tools/tools.gyp +++ b/tools/tools.gyp @@ -86,6 +86,10 @@ 'frame_editing/frame_editing_lib.cc', 'frame_editing/frame_editing_lib.h', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # frame_editing_lib { 'target_name': 'frame_editor', @@ -115,6 +119,10 @@ 'simple_command_line_parser_unittest.cc', 'frame_editing/frame_editing_unittest.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, # tools_unittests ], # targets }], # include_tests diff --git a/video_engine/test/auto_test/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi index df6ad1b1..984cc758 100644 --- a/video_engine/test/auto_test/vie_auto_test.gypi +++ b/video_engine/test/auto_test/vie_auto_test.gypi @@ -130,6 +130,10 @@ }, }], ], # conditions + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], } diff --git a/video_engine/test/libvietest/libvietest.gypi b/video_engine/test/libvietest/libvietest.gypi index e8f3ac7f..ab14de66 100644 --- a/video_engine/test/libvietest/libvietest.gypi +++ b/video_engine/test/libvietest/libvietest.gypi @@ -51,6 +51,10 @@ 'testbed/tb_interfaces.cc', 'testbed/tb_video_channel.cc', ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, ], 'conditions': [ diff --git a/voice_engine/test/voice_engine_tests.gypi b/voice_engine/test/voice_engine_tests.gypi index efa272df..d02ef08f 100644 --- a/voice_engine/test/voice_engine_tests.gypi +++ b/voice_engine/test/voice_engine_tests.gypi @@ -88,6 +88,10 @@ ], }], ], + # Disable warnings to enable Win64 build, issue 1323. + 'msvs_disabled_warnings': [ + 4267, # size_t to int truncation. + ], }, { # command line test that should work on linux/mac/win |