Removing warning suppression flags from rtc_base.

Bug: webrtc:9251
Change-Id: I9dd3b153ef0b8f6f371c7438551d3a6933fc23b0
Reviewed-on: https://webrtc-review.googlesource.com/77668
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23358}
This commit is contained in:
Mirko Bonadei
2018-05-23 10:22:36 +02:00
committed by Commit Bot
parent 71d4dc3509
commit a041f92abf
6 changed files with 5 additions and 88 deletions

View File

@ -836,14 +836,6 @@ rtc_static_library("rtc_base_generic") {
":rtc_base_objc",
]
# TODO(henrike): issue 3307, make rtc_base build with the Chromium default
# compiler settings.
suppressed_configs += [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
if (!is_win) {
cflags += [ "-Wno-uninitialized" ]
}
if (build_with_chromium) {
if (is_win) {
sources += [ "../../webrtc_overrides/rtc_base/win32socketinit.cc" ]
@ -981,16 +973,6 @@ config("rtc_base_tests_utils_exported_config") {
defines = [ "GTEST_RELATIVE_PATH" ]
}
config("rtc_base_tests_utils_warnings_config") {
if (is_win && is_clang) {
cflags = [
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6270
"-Wno-reorder",
"-Wno-sign-compare",
]
}
}
rtc_source_set("rtc_base_tests_utils") {
testonly = true
sources = [
@ -1034,7 +1016,6 @@ rtc_source_set("rtc_base_tests_utils") {
"virtualsocketserver.cc",
"virtualsocketserver.h",
]
configs += [ ":rtc_base_tests_utils_warnings_config" ]
public_configs = [ ":rtc_base_tests_utils_exported_config" ]
deps = [
":checks",
@ -1256,11 +1237,6 @@ if (rtc_include_tests) {
]
}
config("rtc_base_unittests_config") {
if (is_clang) {
cflags = [ "-Wno-unused-const-variable" ]
}
}
rtc_source_set("rtc_base_unittests") {
testonly = true
defines = []
@ -1321,7 +1297,6 @@ if (rtc_include_tests) {
public_deps = [
":rtc_base",
]
configs += [ ":rtc_base_unittests_config" ]
if (build_with_chromium) {
include_dirs = [ "../../boringssl/src/include" ]
}

View File

@ -118,7 +118,6 @@ void MessageQueueManager::ClearInternal(MessageHandler *handler) {
// allowed as the list of message queues does not change while queues are
// cleared.
MarkProcessingCritScope cs(&crit_, &processing_);
std::vector<MessageQueue *>::iterator iter;
for (MessageQueue* queue : message_queues_) {
queue->Clear(handler);
}

View File

@ -377,7 +377,7 @@ int OpenSSLAdapter::BeginSSL() {
if (!tls_alpn_string.empty()) {
SSL_set_alpn_protos(
ssl_, reinterpret_cast<const unsigned char*>(tls_alpn_string.data()),
tls_alpn_string.size());
rtc::dchecked_cast<unsigned>(tls_alpn_string.size()));
}
}
@ -593,7 +593,7 @@ int OpenSSLAdapter::Send(const void* pv, size_t cb) {
pending_data_.SetData(static_cast<const uint8_t*>(pv), cb);
// Since we're taking responsibility for sending this data, return its full
// size. The user of this class can consider it sent.
return cb;
return rtc::dchecked_cast<int>(cb);
}
return ret;

View File

@ -29,6 +29,7 @@
#include "rtc_base/checks.h"
#include "rtc_base/helpers.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/openssl.h"
#include "rtc_base/openssldigest.h"
#include "rtc_base/opensslutility.h"
@ -267,7 +268,8 @@ SSLIdentity* OpenSSLIdentity::FromPEMChainStrings(
const std::string& private_key,
const std::string& certificate_chain) {
BIO* bio =
BIO_new_mem_buf(certificate_chain.data(), certificate_chain.size());
BIO_new_mem_buf(certificate_chain.data(),
rtc::dchecked_cast<int>(certificate_chain.size()));
if (!bio)
return nullptr;
BIO_set_mem_eof_return(bio, 0);

View File

@ -112,36 +112,6 @@ std::unique_ptr<SocketServer> SocketServer::CreateDefault() {
#endif
}
#if defined(WEBRTC_WIN)
// Standard MTUs, from RFC 1191
const uint16_t PACKET_MAXIMUMS[] = {
65535, // Theoretical maximum, Hyperchannel
32000, // Nothing
17914, // 16Mb IBM Token Ring
8166, // IEEE 802.4
// 4464, // IEEE 802.5 (4Mb max)
4352, // FDDI
// 2048, // Wideband Network
2002, // IEEE 802.5 (4Mb recommended)
// 1536, // Expermental Ethernet Networks
// 1500, // Ethernet, Point-to-Point (default)
1492, // IEEE 802.3
1006, // SLIP, ARPANET
// 576, // X.25 Networks
// 544, // DEC IP Portal
// 512, // NETBIOS
508, // IEEE 802/Source-Rt Bridge, ARCNET
296, // Point-to-Point (low delay)
68, // Official minimum
0, // End of list marker
};
static const int IP_HEADER_SIZE = 20u;
static const int IPV6_HEADER_SIZE = 40u;
static const int ICMP_HEADER_SIZE = 8u;
static const int ICMP_PING_TIMEOUT_MILLIS = 10000u;
#endif
PhysicalSocket::PhysicalSocket(PhysicalSocketServer* ss, SOCKET s)
: ss_(ss), s_(s), error_(0),
state_((s == INVALID_SOCKET) ? CS_CLOSED : CS_CONNECTED),

View File

@ -24,35 +24,6 @@ namespace rtc {
// Win32Socket
///////////////////////////////////////////////////////////////////////////////
// TODO: Move this to a common place where PhysicalSocketServer can
// share it.
// Standard MTUs
static const uint16_t PACKET_MAXIMUMS[] = {
65535, // Theoretical maximum, Hyperchannel
32000, // Nothing
17914, // 16Mb IBM Token Ring
8166, // IEEE 802.4
// 4464 // IEEE 802.5 (4Mb max)
4352, // FDDI
// 2048, // Wideband Network
2002, // IEEE 802.5 (4Mb recommended)
// 1536, // Expermental Ethernet Networks
// 1500, // Ethernet, Point-to-Point (default)
1492, // IEEE 802.3
1006, // SLIP, ARPANET
// 576, // X.25 Networks
// 544, // DEC IP Portal
// 512, // NETBIOS
508, // IEEE 802/Source-Rt Bridge, ARCNET
296, // Point-to-Point (low delay)
68, // Official minimum
0, // End of list marker
};
static const int IP_HEADER_SIZE = 20u;
static const int ICMP_HEADER_SIZE = 8u;
static const int ICMP_PING_TIMEOUT_MILLIS = 10000u;
// TODO: Enable for production builds also? Use FormatMessage?
#if !defined(NDEBUG)
LPCSTR WSAErrorToString(int error, LPCSTR *description_result) {