summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Vatiainen <hvn@radiatorsoftware.com>2023-01-30 22:43:29 +0200
committerHeikki Vatiainen <hvn@radiatorsoftware.com>2023-12-10 14:48:07 +0200
commiteb097e9abf3c82f78472002e90e4fe8f3d8d63a9 (patch)
treee5765d6cd328a9038943af699c33d6840ba58243
parent51e0367bc903b0ba5e1f49cb204bcc4ea2368f26 (diff)
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.
-rw-r--r--SSLeay.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/SSLeay.xs b/SSLeay.xs
index 6880382..df96ecb 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) {