summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-02-26 04:51:00 (GMT)
committerJason Evans <jasone@canonware.com>2016-02-26 04:51:00 (GMT)
commit42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076 (patch)
treefe59fa71f3a2ed35c3d5868cfd2b986a6293deef /src/util.c
parent8282a2ad979a9e72ffb645321c8a0b58a09eb9d8 (diff)
downloadjemalloc-42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076.zip
jemalloc-42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076.tar.gz
jemalloc-42ce80e15a5aa2ab6f2ec7e5f7c18164803f3076.tar.bz2
Silence miscellaneous 64-to-32-bit data loss warnings.
This resolves #341.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 9aaa806..02673c7 100644
--- a/src/util.c
+++ b/src/util.c
@@ -60,7 +60,7 @@ wrtmessage(void *cbopaque, const char *s)
*/
UNUSED long result = syscall(SYS_write, STDERR_FILENO, s, strlen(s));
#else
- UNUSED int result = write(STDERR_FILENO, s, strlen(s));
+ UNUSED ssize_t result = write(STDERR_FILENO, s, strlen(s));
#endif
}
@@ -90,7 +90,7 @@ buferror(int err, char *buf, size_t buflen)
#ifdef _WIN32
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0,
- (LPSTR)buf, buflen, NULL);
+ (LPSTR)buf, (DWORD)buflen, NULL);
return (0);
#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
char *b = strerror_r(err, buf, buflen);