const char* instead of char*

Issue #4 resolved
Vince Weaver created an issue

Brian Van Straalen reports:

In interfaces like 

int PAPI_add_named_event( int EventSet, char EventName ); the second argument should be const char , not char *.   that should be consistent across C99/C++11

this code

if ((retval = PAPI_add_named_event( EventSet, "PAPI_L1_DCM" )) != PAPI_OK )  countersAdded=false;

is now illegal for C++11 compliant programs, and is a style of programming used all over the place in papi library calls.

ISO C++11 does not allow conversion from string literal to 'char *'

Comments (1)

  1. Log in to comment