mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
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:
@@ -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 },
|
||||
|
Reference in New Issue
Block a user