aboutsummaryrefslogtreecommitdiff
path: root/lib/warnless.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-01-13 13:34:43 +0100
committerYang Tse <yangsita@gmail.com>2012-01-13 13:34:43 +0100
commit8e82ef9c324c12096f722801518178d0c92e9f80 (patch)
tree9d24a974dd12c834c5cf1f274406294faa6e940b /lib/warnless.c
parentd016f5f5f5b83392ffc333701212971195f6662b (diff)
http_negotiate_sspi.c: fix compiler warning
Diffstat (limited to 'lib/warnless.c')
-rw-r--r--lib/warnless.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/warnless.c b/lib/warnless.c
index 0f5fb5f4d..acdcb26ea 100644
--- a/lib/warnless.c
+++ b/lib/warnless.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -175,6 +175,24 @@ int curlx_uztosi(size_t uznum)
}
/*
+** unsigned size_t to unsigned long
+*/
+
+unsigned long curlx_uztoul(size_t uznum)
+{
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:810) /* conversion may lose significant bits */
+#endif
+
+ return (unsigned long)(uznum & (size_t) CURL_MASK_ULONG);
+
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+}
+
+/*
** signed long to signed int
*/