What steps will reproduce the problem?
1. When compiling Sockperf in Windows 64 bit the following compilation warning
is printed:
src\SockPerf.cpp(2430): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
The following patch will fix this issue:
Author: Dotan Barak <dotanb@dev.mellanox.co.il>
Date: Wed Nov 6 14:36:59 2013 +0200
Fixed compilation warning in Windows 64 bit
Fixed the following compilation warning in Windows:
src\SockPerf.cpp(2430): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
diff --git a/src/SockPerf.cpp b/src/SockPerf.cpp
index f677546..a79282c 100644
--- a/src/SockPerf.cpp
+++ b/src/SockPerf.cpp
@@ -2425,7 +2425,7 @@ int sock_set_tos(int fd)
{
int rc = SOCKPERF_ERR_NONE;
if (s_user_params.tos) {
- size_t len = sizeof(s_user_params.tos);
+ socklen_t len = sizeof(s_user_params.tos);
if (setsockopt(fd, IPPROTO_IP, IP_TOS, (char*)&s_user_params.tos, len) < 0) {
log_err("setsockopt(TOS), set failed. It could be that this option is not supported in your system");
rc = SOCKPERF_ERR_SOCKET;
Original issue reported on code.google.com by dot...@dev.mellanox.co.il on 6 Nov 2013 at 1:20
Original issue reported on code.google.com by
dot...@dev.mellanox.co.il
on 6 Nov 2013 at 1:20