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

Unified Diff: src/internet/model/nsc-tcp-l4-protocol.cc

Issue 337950043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Update patch for 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/internet/model/ipv6-static-routing.cc ('k') | src/internet/model/nsc-tcp-socket-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/internet/model/nsc-tcp-l4-protocol.cc
===================================================================
--- a/src/internet/model/nsc-tcp-l4-protocol.cc
+++ b/src/internet/model/nsc-tcp-l4-protocol.cc
@@ -357,7 +357,7 @@
ipHeader.SetSource (header.GetSource ());
ipHeader.SetDestination (header.GetDestination ());
ipHeader.SetProtocol (PROT_NUMBER);
- ipHeader.SetPayloadSize (packetSize);
+ ipHeader.SetPayloadSize (static_cast<uint16_t> (packetSize));
ipHeader.SetTtl (1);
// all NSC stacks check the IP checksum
ipHeader.EnableChecksum ();
@@ -442,8 +442,8 @@
// printk output.
Time t = Simulator::Now ();
int64_t us = t.GetMicroSeconds ();
- *sec = us / (1000*1000);
- *usec = us - *sec * (1000*1000);
+ *sec = static_cast<unsigned int> (us / (1000*1000));
+ *usec = static_cast<unsigned int> (us - *sec * (1000*1000));
}
« no previous file with comments | « src/internet/model/ipv6-static-routing.cc ('k') | src/internet/model/nsc-tcp-socket-impl.cc » ('j') | no next file with comments »

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