1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Assorted minor changes to silence Windows compiler warnings.

Mostly to do with macro redefinitions or object signedness.
This commit is contained in:
Andrew Dunstan
2011-04-25 12:56:53 -04:00
parent 7762288744
commit 860be17ec3
10 changed files with 44 additions and 16 deletions

View File

@ -63,7 +63,16 @@
#include "utils/syscache.h"
#ifdef WIN32
/*
* This Windows file defines StrNCpy. We don't need it here, so we undefine
* it to keep the compiler quiet, and undefine it again after the file is
* included, so we don't accidentally use theirs.
*/
#undef StrNCpy
#include <shlwapi.h>
#ifdef StrNCpy
#undef STrNCpy
#endif
#endif
#define MAX_L10N_DATA 80
@ -555,7 +564,9 @@ strftime_win32(char *dst, size_t dstlen, const wchar_t *format, const struct tm
dst[len] = '\0';
if (encoding != PG_UTF8)
{
char *convstr = pg_do_encoding_conversion(dst, len, PG_UTF8, encoding);
char *convstr =
(char *) pg_do_encoding_conversion((unsigned char *) dst,
len, PG_UTF8, encoding);
if (dst != convstr)
{