aboutsummaryrefslogtreecommitdiff
path: root/lib/memdebug.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-21 19:59:09 +0000
committerYang Tse <yangsita@gmail.com>2010-02-21 19:59:09 +0000
commit10affed097df354f1b9db8602cd7257f76d10654 (patch)
tree4768a11da103dd44055cfdc3d6bbd0818694b180 /lib/memdebug.c
parent25a49ccd2137c8e26f70c12d18e597f4c7677015 (diff)
downloadgnurl-10affed097df354f1b9db8602cd7257f76d10654.tar.gz
gnurl-10affed097df354f1b9db8602cd7257f76d10654.tar.bz2
gnurl-10affed097df354f1b9db8602cd7257f76d10654.zip
fix compiler warning
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r--lib/memdebug.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 266480e46..b259ed3e5 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -221,9 +221,19 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,
if(countcheck("realloc", line, source))
return NULL;
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:1684)
+ /* 1684: conversion from pointer to same-sized integral type */
+#endif
+
if(ptr)
mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+
mem = (Curl_crealloc)(mem, size);
if(source)
curl_memlog("MEM %s:%d realloc(%p, %zu) = %p\n",
@@ -243,8 +253,18 @@ void curl_dofree(void *ptr, int line, const char *source)
assert(ptr != NULL);
+#ifdef __INTEL_COMPILER
+# pragma warning(push)
+# pragma warning(disable:1684)
+ /* 1684: conversion from pointer to same-sized integral type */
+#endif
+
mem = (void *)((char *)ptr - offsetof(struct memdebug, mem));
+#ifdef __INTEL_COMPILER
+# pragma warning(pop)
+#endif
+
/* destroy */
memset(mem->mem, 0x13, mem->size);