From eb097e9abf3c82f78472002e90e4fe8f3d8d63a9 Mon Sep 17 00:00:00 2001 From: Heikki Vatiainen Date: Mon, 30 Jan 2023 22:43:29 +0200 Subject: [PATCH] GH-425 Avoid C++ compiler warning about conversion from string literal to 'char *. In C string literals do not have the 'const' qualifier but in C++ they do. Avoid C++ compiler warnings by changing our TRACE() funciton definition to use 'const char *' instead of plain 'char *'. This is a useful change for C too because they string passed to the function can be expected to be read-only. --- SSLeay.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SSLeay.xs b/SSLeay.xs index 68803825..df96ecb8 100644 --- a/SSLeay.xs +++ b/SSLeay.xs @@ -227,7 +227,7 @@ which conflicts with perls #define PR4(s,t,u,v) #endif -static void TRACE(int level,char *msg,...) { +static void TRACE(int level,const char *msg,...) { va_list args; SV *trace = get_sv("Net::SSLeay::trace",0); if (trace && SvIOK(trace) && SvIV(trace)>=level) {