Silence miscellaneous 64-to-32-bit data loss warnings.

This resolves #341.
This commit is contained in:
Jason Evans 2016-02-25 20:51:00 -08:00
parent 8282a2ad97
commit 42ce80e15a
4 changed files with 14 additions and 15 deletions

View file

@ -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);