Fix various const-correctness issues

Spotted when temporarily compiling with -Wwrite-strings. This only goes
a small way towards making the code base -Wwrite-strings–clean. It
introduces no functional changes, and fixes no bugs.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
This commit is contained in:
Philip Withnall
2018-04-26 15:16:45 +01:00
parent 9cbfb56061
commit 22cd18500d
10 changed files with 36 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
static void
test_exact (void)
{
char *exact_matches[] = {
const char *exact_matches[] = {
"*",
"a::*",
"a::*,b::*",
@@ -29,8 +29,8 @@ static void
test_equality (void)
{
struct {
char *expected;
char *actual;
const char *expected;
const char *actual;
} equals[] = {
/* star makes everything else go away */
{ "*", "*,*" },
@@ -70,9 +70,9 @@ static void
test_subtract (void)
{
struct {
char *attributes;
char *subtract;
char *result;
const char *attributes;
const char *subtract;
const char *result;
} subtractions[] = {
/* * subtracts everything */
{ "*", "*", NULL },