Skip to content

Commit 94ec712

Browse files
committed
Silence compiler warning about signed vs unsigned chars.
1 parent 6b41d64 commit 94ec712

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

contrib/sslinfo/sslinfo.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ Datum ASN1_STRING_to_text(ASN1_STRING *str)
122122
outlen = 0;
123123
BIO_write(membuf, &outlen, 1);
124124
size = BIO_get_mem_data(membuf, &sp);
125-
dp = pg_do_encoding_conversion(sp, size-1, PG_UTF8, GetDatabaseEncoding());
125+
dp = (char *) pg_do_encoding_conversion((unsigned char *) sp,
126+
size-1,
127+
PG_UTF8,
128+
GetDatabaseEncoding());
126129
outlen = strlen(dp);
127130
result = palloc(VARHDRSZ + outlen);
128131
memcpy(VARDATA(result), dp, outlen);
@@ -288,7 +291,10 @@ Datum X509_NAME_to_text(X509_NAME *name)
288291
BIO_write(membuf, &i, 1);
289292
size = BIO_get_mem_data(membuf, &sp);
290293

291-
dp = pg_do_encoding_conversion(sp, size-1, PG_UTF8, GetDatabaseEncoding());
294+
dp = (char *) pg_do_encoding_conversion((unsigned char *) sp,
295+
size-1,
296+
PG_UTF8,
297+
GetDatabaseEncoding());
292298
BIO_free(membuf);
293299
outlen = strlen(dp);
294300
result = palloc(VARHDRSZ + outlen);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy