Remove clang:find_bad_constructs suppression from logging (part 1).
This CL removes //build/config/clang:find_bad_constructs from the suppressed_configs list, which means that clang:find_bad_constructs is now enabled on these translation units. Bug: webrtc:9251, webrtc:163 Change-Id: I443c0c77cef30a3f5712f72ce88db80d1fb29874 Reviewed-on: https://webrtc-review.googlesource.com/96642 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24567}
This commit is contained in:

committed by
Commit Bot

parent
b267b0e021
commit
55d5ef0048
@ -287,11 +287,6 @@ if (rtc_enable_protobuf) {
|
|||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
"//third_party/abseil-cpp/absl/memory",
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!build_with_chromium && is_clang) {
|
|
||||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
||||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_include_tests) {
|
if (rtc_include_tests) {
|
||||||
|
@ -236,6 +236,13 @@ void GetHeaderExtensions(std::vector<RtpExtension>* header_extensions,
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
ParsedRtcEventLog::ParsedRtcEventLog() = default;
|
||||||
|
ParsedRtcEventLog::~ParsedRtcEventLog() = default;
|
||||||
|
|
||||||
|
ParsedRtcEventLog::BweProbeResultEvent::BweProbeResultEvent() = default;
|
||||||
|
ParsedRtcEventLog::BweProbeResultEvent::BweProbeResultEvent(
|
||||||
|
const BweProbeResultEvent&) = default;
|
||||||
|
|
||||||
bool ParsedRtcEventLog::ParseFile(const std::string& filename) {
|
bool ParsedRtcEventLog::ParseFile(const std::string& filename) {
|
||||||
std::ifstream file(filename, std::ios_base::in | std::ios_base::binary);
|
std::ifstream file(filename, std::ios_base::in | std::ios_base::binary);
|
||||||
if (!file.good() || !file.is_open()) {
|
if (!file.good() || !file.is_open()) {
|
||||||
|
@ -46,6 +46,9 @@ class ParsedRtcEventLog {
|
|||||||
friend class RtcEventLogTestHelper;
|
friend class RtcEventLogTestHelper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
ParsedRtcEventLog();
|
||||||
|
~ParsedRtcEventLog();
|
||||||
|
|
||||||
struct BweProbeClusterCreatedEvent {
|
struct BweProbeClusterCreatedEvent {
|
||||||
uint64_t timestamp;
|
uint64_t timestamp;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
@ -55,6 +58,9 @@ class ParsedRtcEventLog {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct BweProbeResultEvent {
|
struct BweProbeResultEvent {
|
||||||
|
BweProbeResultEvent();
|
||||||
|
BweProbeResultEvent(const BweProbeResultEvent&);
|
||||||
|
|
||||||
uint64_t timestamp;
|
uint64_t timestamp;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
absl::optional<uint64_t> bitrate_bps;
|
absl::optional<uint64_t> bitrate_bps;
|
||||||
|
@ -272,6 +272,60 @@ void GetHeaderExtensions(std::vector<RtpExtension>* header_extensions,
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
LoggedRtcpPacket::LoggedRtcpPacket(uint64_t timestamp_us,
|
||||||
|
const uint8_t* packet,
|
||||||
|
size_t total_length)
|
||||||
|
: timestamp_us(timestamp_us), raw_data(packet, packet + total_length) {}
|
||||||
|
LoggedRtcpPacket::LoggedRtcpPacket(const LoggedRtcpPacket& rhs) = default;
|
||||||
|
LoggedRtcpPacket::~LoggedRtcpPacket() = default;
|
||||||
|
|
||||||
|
LoggedVideoSendConfig::LoggedVideoSendConfig(
|
||||||
|
int64_t timestamp_us,
|
||||||
|
const std::vector<rtclog::StreamConfig>& configs)
|
||||||
|
: timestamp_us(timestamp_us), configs(configs) {}
|
||||||
|
LoggedVideoSendConfig::LoggedVideoSendConfig(const LoggedVideoSendConfig& rhs) =
|
||||||
|
default;
|
||||||
|
LoggedVideoSendConfig::~LoggedVideoSendConfig() = default;
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::~ParsedRtcEventLogNew() = default;
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamIncoming::LoggedRtpStreamIncoming() =
|
||||||
|
default;
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamIncoming::LoggedRtpStreamIncoming(
|
||||||
|
const LoggedRtpStreamIncoming& rhs) = default;
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamIncoming::~LoggedRtpStreamIncoming() =
|
||||||
|
default;
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamOutgoing::LoggedRtpStreamOutgoing() =
|
||||||
|
default;
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamOutgoing::LoggedRtpStreamOutgoing(
|
||||||
|
const LoggedRtpStreamOutgoing& rhs) = default;
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamOutgoing::~LoggedRtpStreamOutgoing() =
|
||||||
|
default;
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamView::LoggedRtpStreamView(
|
||||||
|
uint32_t ssrc,
|
||||||
|
const LoggedRtpPacketIncoming* ptr,
|
||||||
|
size_t num_elements)
|
||||||
|
: ssrc(ssrc),
|
||||||
|
packet_view(PacketView<const LoggedRtpPacket>::Create(
|
||||||
|
ptr,
|
||||||
|
num_elements,
|
||||||
|
offsetof(LoggedRtpPacketIncoming, rtp))) {}
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamView::LoggedRtpStreamView(
|
||||||
|
uint32_t ssrc,
|
||||||
|
const LoggedRtpPacketOutgoing* ptr,
|
||||||
|
size_t num_elements)
|
||||||
|
: ssrc(ssrc),
|
||||||
|
packet_view(PacketView<const LoggedRtpPacket>::Create(
|
||||||
|
ptr,
|
||||||
|
num_elements,
|
||||||
|
offsetof(LoggedRtpPacketOutgoing, rtp))) {}
|
||||||
|
|
||||||
|
ParsedRtcEventLogNew::LoggedRtpStreamView::LoggedRtpStreamView(
|
||||||
|
const LoggedRtpStreamView&) = default;
|
||||||
|
|
||||||
ParsedRtcEventLogNew::ParsedRtcEventLogNew(
|
ParsedRtcEventLogNew::ParsedRtcEventLogNew(
|
||||||
UnconfiguredHeaderExtensions parse_unconfigured_header_extensions)
|
UnconfiguredHeaderExtensions parse_unconfigured_header_extensions)
|
||||||
: parse_unconfigured_header_extensions_(
|
: parse_unconfigured_header_extensions_(
|
||||||
|
@ -178,8 +178,9 @@ struct LoggedRtpPacketOutgoing {
|
|||||||
struct LoggedRtcpPacket {
|
struct LoggedRtcpPacket {
|
||||||
LoggedRtcpPacket(uint64_t timestamp_us,
|
LoggedRtcpPacket(uint64_t timestamp_us,
|
||||||
const uint8_t* packet,
|
const uint8_t* packet,
|
||||||
size_t total_length)
|
size_t total_length);
|
||||||
: timestamp_us(timestamp_us), raw_data(packet, packet + total_length) {}
|
LoggedRtcpPacket(const LoggedRtcpPacket&);
|
||||||
|
~LoggedRtcpPacket();
|
||||||
int64_t timestamp_us;
|
int64_t timestamp_us;
|
||||||
std::vector<uint8_t> raw_data;
|
std::vector<uint8_t> raw_data;
|
||||||
int64_t log_time_us() const { return timestamp_us; }
|
int64_t log_time_us() const { return timestamp_us; }
|
||||||
@ -286,8 +287,9 @@ struct LoggedVideoRecvConfig {
|
|||||||
|
|
||||||
struct LoggedVideoSendConfig {
|
struct LoggedVideoSendConfig {
|
||||||
LoggedVideoSendConfig(int64_t timestamp_us,
|
LoggedVideoSendConfig(int64_t timestamp_us,
|
||||||
const std::vector<rtclog::StreamConfig> configs)
|
const std::vector<rtclog::StreamConfig>& configs);
|
||||||
: timestamp_us(timestamp_us), configs(configs) {}
|
LoggedVideoSendConfig(const LoggedVideoSendConfig&);
|
||||||
|
~LoggedVideoSendConfig();
|
||||||
int64_t timestamp_us;
|
int64_t timestamp_us;
|
||||||
std::vector<rtclog::StreamConfig> configs;
|
std::vector<rtclog::StreamConfig> configs;
|
||||||
int64_t log_time_us() const { return timestamp_us; }
|
int64_t log_time_us() const { return timestamp_us; }
|
||||||
@ -470,6 +472,8 @@ class ParsedRtcEventLogNew {
|
|||||||
friend class RtcEventLogTestHelper;
|
friend class RtcEventLogTestHelper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
~ParsedRtcEventLogNew();
|
||||||
|
|
||||||
enum class EventType {
|
enum class EventType {
|
||||||
UNKNOWN_EVENT = 0,
|
UNKNOWN_EVENT = 0,
|
||||||
LOG_START = 1,
|
LOG_START = 1,
|
||||||
@ -499,11 +503,17 @@ class ParsedRtcEventLogNew {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LoggedRtpStreamIncoming {
|
struct LoggedRtpStreamIncoming {
|
||||||
|
LoggedRtpStreamIncoming();
|
||||||
|
LoggedRtpStreamIncoming(const LoggedRtpStreamIncoming&);
|
||||||
|
~LoggedRtpStreamIncoming();
|
||||||
uint32_t ssrc;
|
uint32_t ssrc;
|
||||||
std::vector<LoggedRtpPacketIncoming> incoming_packets;
|
std::vector<LoggedRtpPacketIncoming> incoming_packets;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LoggedRtpStreamOutgoing {
|
struct LoggedRtpStreamOutgoing {
|
||||||
|
LoggedRtpStreamOutgoing();
|
||||||
|
LoggedRtpStreamOutgoing(const LoggedRtpStreamOutgoing&);
|
||||||
|
~LoggedRtpStreamOutgoing();
|
||||||
uint32_t ssrc;
|
uint32_t ssrc;
|
||||||
std::vector<LoggedRtpPacketOutgoing> outgoing_packets;
|
std::vector<LoggedRtpPacketOutgoing> outgoing_packets;
|
||||||
};
|
};
|
||||||
@ -511,20 +521,11 @@ class ParsedRtcEventLogNew {
|
|||||||
struct LoggedRtpStreamView {
|
struct LoggedRtpStreamView {
|
||||||
LoggedRtpStreamView(uint32_t ssrc,
|
LoggedRtpStreamView(uint32_t ssrc,
|
||||||
const LoggedRtpPacketIncoming* ptr,
|
const LoggedRtpPacketIncoming* ptr,
|
||||||
size_t num_elements)
|
size_t num_elements);
|
||||||
: ssrc(ssrc),
|
|
||||||
packet_view(PacketView<const LoggedRtpPacket>::Create(
|
|
||||||
ptr,
|
|
||||||
num_elements,
|
|
||||||
offsetof(LoggedRtpPacketIncoming, rtp))) {}
|
|
||||||
LoggedRtpStreamView(uint32_t ssrc,
|
LoggedRtpStreamView(uint32_t ssrc,
|
||||||
const LoggedRtpPacketOutgoing* ptr,
|
const LoggedRtpPacketOutgoing* ptr,
|
||||||
size_t num_elements)
|
size_t num_elements);
|
||||||
: ssrc(ssrc),
|
LoggedRtpStreamView(const LoggedRtpStreamView&);
|
||||||
packet_view(PacketView<const LoggedRtpPacket>::Create(
|
|
||||||
ptr,
|
|
||||||
num_elements,
|
|
||||||
offsetof(LoggedRtpPacketOutgoing, rtp))) {}
|
|
||||||
uint32_t ssrc;
|
uint32_t ssrc;
|
||||||
PacketView<const LoggedRtpPacket> packet_view;
|
PacketView<const LoggedRtpPacket> packet_view;
|
||||||
};
|
};
|
||||||
|
@ -46,8 +46,9 @@ constexpr size_t Nack::kNackItemLength;
|
|||||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
// | PID | BLP |
|
// | PID | BLP |
|
||||||
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
Nack::Nack() {}
|
Nack::Nack() = default;
|
||||||
Nack::~Nack() {}
|
Nack::Nack(const Nack& rhs) = default;
|
||||||
|
Nack::~Nack() = default;
|
||||||
|
|
||||||
bool Nack::Parse(const CommonHeader& packet) {
|
bool Nack::Parse(const CommonHeader& packet) {
|
||||||
RTC_DCHECK_EQ(packet.type(), kPacketType);
|
RTC_DCHECK_EQ(packet.type(), kPacketType);
|
||||||
|
@ -23,6 +23,7 @@ class Nack : public Rtpfb {
|
|||||||
public:
|
public:
|
||||||
static constexpr uint8_t kFeedbackMessageType = 1;
|
static constexpr uint8_t kFeedbackMessageType = 1;
|
||||||
Nack();
|
Nack();
|
||||||
|
Nack(const Nack&);
|
||||||
~Nack() override;
|
~Nack() override;
|
||||||
|
|
||||||
// Parse assumes header is already parsed and validated.
|
// Parse assumes header is already parsed and validated.
|
||||||
|
@ -35,6 +35,8 @@ constexpr size_t ReceiverReport::kMaxNumberOfReportBlocks;
|
|||||||
|
|
||||||
ReceiverReport::ReceiverReport() : sender_ssrc_(0) {}
|
ReceiverReport::ReceiverReport() : sender_ssrc_(0) {}
|
||||||
|
|
||||||
|
ReceiverReport::ReceiverReport(const ReceiverReport& rhs) = default;
|
||||||
|
|
||||||
ReceiverReport::~ReceiverReport() = default;
|
ReceiverReport::~ReceiverReport() = default;
|
||||||
|
|
||||||
bool ReceiverReport::Parse(const CommonHeader& packet) {
|
bool ReceiverReport::Parse(const CommonHeader& packet) {
|
||||||
|
@ -26,6 +26,7 @@ class ReceiverReport : public RtcpPacket {
|
|||||||
static constexpr size_t kMaxNumberOfReportBlocks = 0x1f;
|
static constexpr size_t kMaxNumberOfReportBlocks = 0x1f;
|
||||||
|
|
||||||
ReceiverReport();
|
ReceiverReport();
|
||||||
|
ReceiverReport(const ReceiverReport&);
|
||||||
~ReceiverReport() override;
|
~ReceiverReport() override;
|
||||||
|
|
||||||
// Parse assumes header is already parsed and validated.
|
// Parse assumes header is already parsed and validated.
|
||||||
|
@ -41,6 +41,8 @@ constexpr uint8_t Remb::kFeedbackMessageType;
|
|||||||
|
|
||||||
Remb::Remb() : bitrate_bps_(0) {}
|
Remb::Remb() : bitrate_bps_(0) {}
|
||||||
|
|
||||||
|
Remb::Remb(const Remb& rhs) = default;
|
||||||
|
|
||||||
Remb::~Remb() = default;
|
Remb::~Remb() = default;
|
||||||
|
|
||||||
bool Remb::Parse(const CommonHeader& packet) {
|
bool Remb::Parse(const CommonHeader& packet) {
|
||||||
|
@ -26,6 +26,7 @@ class Remb : public Psfb {
|
|||||||
static constexpr size_t kMaxNumberOfSsrcs = 0xff;
|
static constexpr size_t kMaxNumberOfSsrcs = 0xff;
|
||||||
|
|
||||||
Remb();
|
Remb();
|
||||||
|
Remb(const Remb&);
|
||||||
~Remb() override;
|
~Remb() override;
|
||||||
|
|
||||||
// Parse assumes header is already parsed and validated.
|
// Parse assumes header is already parsed and validated.
|
||||||
|
Reference in New Issue
Block a user