summaryrefslogtreecommitdiff
path: root/lib/warnless.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-05-26 15:44:53 +0200
committerYang Tse <yangsita@gmail.com>2011-05-26 15:44:53 +0200
commit3c9ff41a1fef4b03571f5a7f905e5016cae55208 (patch)
treedbdc9b5ca8fccf532a35763a4acc71869e1e3aa3 /lib/warnless.c
parentc8c8816a97d0214184ee1d4dfaf2775edf28ff53 (diff)
downloadcurl-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.c16
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__ */