diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2011-04-25 12:56:53 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2011-04-25 12:56:53 -0400 |
commit | 860be17ec3c19a1aeba0bbe7ecaf30be409ea446 (patch) | |
tree | d15c287b1ce9ea89d220ec2bf963c1ef61a3792d /src/backend/utils/adt/pg_locale.c | |
parent | 77622887449f0fd0eb08b28fe4fa5992c357d45a (diff) | |
download | postgresql-860be17ec3c19a1aeba0bbe7ecaf30be409ea446.tar.gz postgresql-860be17ec3c19a1aeba0bbe7ecaf30be409ea446.zip |
Assorted minor changes to silence Windows compiler warnings.
Mostly to do with macro redefinitions or object signedness.
Diffstat (limited to 'src/backend/utils/adt/pg_locale.c')
-rw-r--r-- | src/backend/utils/adt/pg_locale.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index 8208d3cad9e..7c941dd991f 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -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) { |