diff options
author | Yang Tse <yangsita@gmail.com> | 2011-05-26 15:44:53 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-05-26 15:44:53 +0200 |
commit | 3c9ff41a1fef4b03571f5a7f905e5016cae55208 (patch) | |
tree | dbdc9b5ca8fccf532a35763a4acc71869e1e3aa3 /lib/warnless.c | |
parent | c8c8816a97d0214184ee1d4dfaf2775edf28ff53 (diff) | |
download | curl-3c9ff41a1fef4b03571f5a7f905e5016cae55208.tar.gz |
compiler warning: fix
Fix compiler warning: conversion may lose significant bits
Diffstat (limited to 'lib/warnless.c')
-rw-r--r-- | lib/warnless.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/warnless.c b/lib/warnless.c index 89abd14bc..0f7814b27 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -280,4 +280,20 @@ void curlx_FD_ZERO(fd_set *fdset) #pragma warning(pop) } +unsigned short curlx_htons(unsigned short usnum) +{ + #pragma warning(push) + #pragma warning(disable:810) /* conversion may lose significant bits */ + return htons(usnum); + #pragma warning(pop) +} + +unsigned short curlx_ntohs(unsigned short usnum) +{ + #pragma warning(push) + #pragma warning(disable:810) /* conversion may lose significant bits */ + return ntohs(usnum); + #pragma warning(pop) +} + #endif /* __INTEL_COMPILER && __unix__ */ |