Skip to content

Commit

Permalink
GH-425 Avoid C++ compiler warning about conversion from string litera…
Browse files Browse the repository at this point in the history
…l 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.
  • Loading branch information
h-vn committed Dec 10, 2023
1 parent 51e0367 commit eb097e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SSLeay.xs
Expand Up @@ -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) {
Expand Down

0 comments on commit eb097e9

Please sign in to comment.