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

Unified Diff: src/network/utils/pcap-file-wrapper.cc

Issue 339780043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Update patch with latest module changes Created 6 years 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/network/utils/packetbb.cc ('k') | src/network/utils/queue-item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/network/utils/pcap-file-wrapper.cc
===================================================================
--- a/src/network/utils/pcap-file-wrapper.cc
+++ b/src/network/utils/pcap-file-wrapper.cc
@@ -124,14 +124,14 @@
uint64_t current = t.GetNanoSeconds ();
uint64_t s = current / 1000000000;
uint64_t ns = current % 1000000000;
- m_file.Write (s, ns, p);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (ns), p);
}
else
{
uint64_t current = t.GetMicroSeconds ();
uint64_t s = current / 1000000;
uint64_t us = current % 1000000;
- m_file.Write (s, us, p);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (us), p);
}
}
@@ -144,14 +144,14 @@
uint64_t current = t.GetNanoSeconds ();
uint64_t s = current / 1000000000;
uint64_t ns = current % 1000000000;
- m_file.Write (s, ns, header, p);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (ns), header, p);
}
else
{
uint64_t current = t.GetMicroSeconds ();
uint64_t s = current / 1000000;
uint64_t us = current % 1000000;
- m_file.Write (s, us, header, p);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (us), header, p);
}
}
@@ -164,14 +164,14 @@
uint64_t current = t.GetNanoSeconds ();
uint64_t s = current / 1000000000;
uint64_t ns = current % 1000000000;
- m_file.Write (s, ns, buffer, length);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (ns), buffer, length);
}
else
{
uint64_t current = t.GetMicroSeconds ();
uint64_t s = current / 1000000;
uint64_t us = current % 1000000;
- m_file.Write (s, us, buffer, length);
+ m_file.Write (static_cast<uint32_t> (s), static_cast<uint32_t> (us), buffer, length);
}
}
@@ -184,8 +184,9 @@
uint32_t origLen;
uint32_t readLen;
- uint32_t maxBytes=65536;
- uint8_t datbuf[maxBytes];
+ #define MAXBYTES 65536
+ uint32_t maxBytes=MAXBYTES;
+ uint8_t datbuf[MAXBYTES];
m_file.Read (datbuf,maxBytes,tsSec,tsUsec,inclLen,origLen,readLen);
« no previous file with comments | « src/network/utils/packetbb.cc ('k') | src/network/utils/queue-item.cc » ('j') | no next file with comments »

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