libnuma numa_parse_cpustring and similar should take a const char* parameter
Issue
- libnuma numa_parse_cpustring and similar should take a const char* parameter
- The declaration of the functions like numa_parse_cpustring are taking a char*:
struct bitmask *numa_parse_cpustring(char *);
struct bitmask *numa_parse_nodestring(char *);
- However it should be declared a const char * to prevent warnings like:
testconst.c:10:45: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
- Looking at the source code, the string is handled like it was a const and it doesn't actually modify the string that it is parsing.
Environment
- Red Hat Enterprise Linux 6
- numactl-2.0.3-9.el6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.