diff options
author | Rakesh Raghava <rakeshraghava@google.com> | 2023-01-11 18:42:32 +0000 |
---|---|---|
committer | Rakesh Raghava <rakeshraghava@google.com> | 2023-01-11 18:45:23 +0000 |
commit | ff70823a262940092bef366656218938dfc23f04 (patch) | |
tree | 72b28a48c2af7f3d48b9c42b46e81b96708e8457 /tests/native/service/src/com/android/telephony/imsmedia | |
parent | 2d74614f5b629c563b16304ad4183fddf86478c1 (diff) | |
download | ImsMedia-ff70823a262940092bef366656218938dfc23f04.tar.gz |
Fix ImsMedia clang issues
- issues observed with Clang-Tidy Checks such as
cert-oop54-cpp, performance-unnecessary-value-param,
bugprone-macro-parentheses, bugprone-integer-division,
bugprone-undefined-memory-manipulation,
clang-analyzer-cplusplus.NewDeleteLeaks are resolved
Bug: 265030400
Test: atest ImsMediaNativeTests
Verified VoLTE calls with device
Change-Id: Ib277ca20c155e82dc205213957df100fb8646f22
Diffstat (limited to 'tests/native/service/src/com/android/telephony/imsmedia')
2 files changed, 0 insertions, 15 deletions
diff --git a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpChunkTest.cpp b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpChunkTest.cpp index 5b2ece14..acfb1579 100644 --- a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpChunkTest.cpp +++ b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpChunkTest.cpp @@ -54,7 +54,6 @@ TEST_F(RtcpChunkTest, decodeChunkItem) chunkItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[chunkItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", chunkItem->ucLength); @@ -110,7 +109,6 @@ TEST_F(RtcpChunkTest, decodeMultichunkItem) chunkItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[chunkItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", chunkItem->ucLength); @@ -127,8 +125,6 @@ TEST_F(RtcpChunkTest, decodeMultichunkItem) chunkItemSec->ucType = 1; chunkItemSec->ucLength = 18; - ASSERT_TRUE(pcBuffer != nullptr); - memcpy(pcBuffer, "google@example.com", chunkItemSec->ucLength); chunkItemSec->pValue = pcBuffer; @@ -175,7 +171,6 @@ TEST_F(RtcpChunkTest, decodeSdesChunkWithInvalidType) chunkItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[chunkItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", chunkItem->ucLength); @@ -192,8 +187,6 @@ TEST_F(RtcpChunkTest, decodeSdesChunkWithInvalidType) chunkItemSec->ucType = 2; chunkItemSec->ucLength = 18; - ASSERT_TRUE(pcBuffer != nullptr); - memcpy(pcBuffer, "google@example.com", chunkItemSec->ucLength); chunkItemSec->pValue = pcBuffer; @@ -242,7 +235,6 @@ TEST_F(RtcpChunkTest, decodeSdesChunkWithInvalidLength) chunkItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[chunkItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", chunkItem->ucLength); diff --git a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpSdesPacketTest.cpp b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpSdesPacketTest.cpp index 00346eb4..306d0430 100644 --- a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpSdesPacketTest.cpp +++ b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/protocol/rtp/core/RtcpSdesPacketTest.cpp @@ -55,7 +55,6 @@ TEST_F(RtcpSdesPacketTest, decodeSdesPacketSingleSdesItem) sdesItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[sdesItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", sdesItem->ucLength); @@ -117,7 +116,6 @@ TEST_F(RtcpSdesPacketTest, decodeSdesPacketMultiSdesItem) sdesItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[sdesItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", sdesItem->ucLength); @@ -133,8 +131,6 @@ TEST_F(RtcpSdesPacketTest, decodeSdesPacketMultiSdesItem) sdesItemSec->ucType = 1; sdesItemSec->ucLength = 18; - ASSERT_TRUE(pcBuffer != nullptr); - memcpy(pcBuffer, "google@example.com", sdesItemSec->ucLength); sdesItemSec->pValue = pcBuffer; @@ -191,7 +187,6 @@ TEST_F(RtcpSdesPacketTest, decodeSdesPacketDiffSdesType) sdesItem->ucLength = 18; RtpDt_UChar* pcBuffer = new RtpDt_UChar[sdesItem->ucLength]; - ASSERT_TRUE(pcBuffer != nullptr); memcpy(pcBuffer, "sleepy@example.com", sdesItem->ucLength); @@ -208,8 +203,6 @@ TEST_F(RtcpSdesPacketTest, decodeSdesPacketDiffSdesType) sdesItemSec->ucType = 2; sdesItemSec->ucLength = 18; - ASSERT_TRUE(pcBuffer != nullptr); - memcpy(pcBuffer, "google@example.com", sdesItemSec->ucLength); sdesItemSec->pValue = pcBuffer; |