On Sat, May 31, 2014 at 17:32, Brent Cook wrote: > ASN1_STRING_data returns an unsigned char *, but strlcat's second > parameter is a const char * > --- > src/crypto/ts/ts_rsp_verify.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/crypto/ts/ts_rsp_verify.c b/src/crypto/ts/ts_rsp_verify.c > index 2a4c0c5..49754b5 100644 > --- a/src/crypto/ts/ts_rsp_verify.c > +++ b/src/crypto/ts/ts_rsp_verify.c > @@ -564,7 +564,7 @@ TS_get_status_text(STACK_OF(ASN1_UTF8STRING) *text) > ASN1_UTF8STRING *current = sk_ASN1_UTF8STRING_value(text, i); > if (i > 0) > strlcat(result, "/", length); > - strlcat(result, ASN1_STRING_data(current), length); > + strlcat(result, (const char *)ASN1_STRING_data(current), > length); > } > return result; > }
What compiler warns about this? It's perfectly fine to pass a nonconst string to a function that takes a const string.