summaryrefslogtreecommitdiff
path: root/src/bin/psql/mbprint.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-02-28 12:42:08 +0200
committerPeter Eisentraut <peter_e@gmx.net>2012-02-28 12:42:08 +0200
commit973e9fb294dc05a384ecae7623923ae53cb81806 (patch)
tree8f1499cd7e9de9b63e1ccff755d36393b1eb4aa7 /src/bin/psql/mbprint.c
parent41e3c94cac0e68257126b2d264dc5e877e892490 (diff)
Add const qualifiers where they are accidentally cast away
This only produces warnings under -Wcast-qual, but it's more correct and consistent in any case.
Diffstat (limited to 'src/bin/psql/mbprint.c')
-rw-r--r--src/bin/psql/mbprint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/psql/mbprint.c b/src/bin/psql/mbprint.c
index 2904b39b965..32fc756efe5 100644
--- a/src/bin/psql/mbprint.c
+++ b/src/bin/psql/mbprint.c
@@ -217,10 +217,10 @@ pg_wcssize(const unsigned char *pwcs, size_t len, int encoding,
for (; *pwcs && len > 0; pwcs += chlen)
{
- chlen = PQmblen((char *) pwcs, encoding);
+ chlen = PQmblen((const char *) pwcs, encoding);
if (len < (size_t) chlen)
break;
- w = PQdsplen((char *) pwcs, encoding);
+ w = PQdsplen((const char *) pwcs, encoding);
if (chlen == 1) /* single-byte char */
{
@@ -298,10 +298,10 @@ pg_wcsformat(const unsigned char *pwcs, size_t len, int encoding,
for (; *pwcs && len > 0; pwcs += chlen)
{
- chlen = PQmblen((char *) pwcs, encoding);
+ chlen = PQmblen((const char *) pwcs, encoding);
if (len < (size_t) chlen)
break;
- w = PQdsplen((char *) pwcs, encoding);
+ w = PQdsplen((const char *) pwcs, encoding);
if (chlen == 1) /* single-byte char */
{