From: Maxim Mamontov Date: Mon, 19 Sep 2011 20:12:01 +0000 (+0300) Subject: Add explicit casts for raw ip tests to shut up compiler X-Git-Tag: 2.408-rc1~22 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/478b43b528b9f209abc10a1928a389f81885869e?hp=15cdce9cea7f6cdc188932ba889f055d9705d1f2 Add explicit casts for raw ip tests to shut up compiler --- diff --git a/tests/test_raw_ip.cpp b/tests/test_raw_ip.cpp index be20ed01..2f75c785 100644 --- a/tests/test_raw_ip.cpp +++ b/tests/test_raw_ip.cpp @@ -8,6 +8,7 @@ #include "tut/tut.hpp" +#include "stg/os_int.h" #include "raw_ip_packet_old.h" #include "stg/raw_ip_packet.h" @@ -46,11 +47,11 @@ namespace tut rp.rawPacket.header.sPort = htons(80); rp.rawPacket.header.dPort = htons(38546); - ensure_equals("IP header size (explicitly)", sizeof(rp.rawPacket.header.ipHeader), 20); + ensure_equals("IP header size (explicitly)", sizeof(rp.rawPacket.header.ipHeader), static_cast(20)); ensure_equals("IP version", rp.GetIPVersion(), 4); ensure_equals("IP header size (with options)", rp.GetHeaderLen(), 20); ensure_equals("Underlying protocol version", rp.GetProto(), 6); - ensure_equals("Packet length", rp.GetLen(), 40); + ensure_equals("Packet length", rp.GetLen(), static_cast(40)); ensure_equals("Source IP address", rp.GetSrcIP(), inet_addr("192.168.0.1")); ensure_equals("Destination IP address", rp.GetDstIP(), inet_addr("192.168.0.101")); ensure_equals("Source port number", rp.GetSrcPort(), 80);