1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-09 02:08:45 +03:00

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.
This commit is contained in:
Peter Eisentraut
2012-02-28 12:42:08 +02:00
parent 41e3c94cac
commit 973e9fb294
9 changed files with 19 additions and 19 deletions

View File

@@ -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 */
{