Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Unified Diff: src/lte/test/test-asn1-encoding.cc

Issue 338840043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Patch updates for x64 build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lte/test/lte-test-uplink-sinr.cc ('k') | src/lte/test/test-epc-tft-classifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lte/test/test-asn1-encoding.cc
===================================================================
--- a/src/lte/test/test-asn1-encoding.cc
+++ b/src/lte/test/test-asn1-encoding.cc
@@ -51,8 +51,8 @@
static std::string sprintPacketContentsHex (Ptr<Packet> pkt)
{
uint32_t psize = pkt->GetSize ();
- uint8_t buffer[psize];
- char sbuffer[psize * 3];
+ uint8_t* buffer = new uint8_t[psize];
+ char* sbuffer = new char[psize * 3];
pkt->CopyData (buffer, psize);
for (uint32_t i = 0; i < psize; i++)
{
@@ -69,7 +69,7 @@
static std::string sprintPacketContentsBin (Ptr<Packet> pkt)
{
uint32_t psize = pkt->GetSize ();
- uint8_t buffer[psize];
+ uint8_t* buffer = new uint8_t[psize];
std::ostringstream oss (std::ostringstream::out);
pkt->CopyData (buffer, psize);
for (uint32_t i = 0; i < psize; i++)
« no previous file with comments | « src/lte/test/lte-test-uplink-sinr.cc ('k') | src/lte/test/test-epc-tft-classifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b