From c16c1a32af17ab89540dec684d4111aaf2325568 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 23 Nov 2013 18:14:05 +0100 Subject: [PATCH] WPrefs: Added a few missing const attributes Signed-off-by: Christophe CURIS --- WPrefs.app/FontSimple.c | 22 +++++++++++----------- WPrefs.app/WindowHandling.c | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/WPrefs.app/FontSimple.c b/WPrefs.app/FontSimple.c index ebcbaf26..a124a981 100644 --- a/WPrefs.app/FontSimple.c +++ b/WPrefs.app/FontSimple.c @@ -91,9 +91,9 @@ typedef struct _Panel { #define ICON_FILE "fonts" -static struct { - char *option; - char *label; +static const struct { + const char *option; + const char *label; } fontOptions[] = { { "WindowTitleFont", N_("Window Title")}, { @@ -104,7 +104,7 @@ static struct { "LargeDisplayFont", N_("Desktop Caption")}, { NULL, NULL},}; -static char *standardSizes[] = { +static const char *standardSizes[] = { "6", "8", "9", @@ -128,9 +128,9 @@ static char *standardSizes[] = { NULL }; -static struct { +static const struct { int weight; - char *name; + const char *name; } fontWeights[] = { { FC_WEIGHT_THIN, "Thin"}, { @@ -146,9 +146,9 @@ static struct { 0, NULL} }; -static struct { +static const struct { int slant; - char *name; + const char *name; } fontSlants[] = { { FC_SLANT_ROMAN, ""}, /*"Roman"}, */ @@ -158,9 +158,9 @@ static struct { 0, NULL} }; -static struct { +static const struct { int width; - char *name; + const char *name; } fontWidths[] = { { FC_WIDTH_ULTRACONDENSED, "UltraCondensed"}, { @@ -371,7 +371,7 @@ static void selectedFamily(WMWidget * w, void *data) WMClearList(panel->styleL); for (i = 0; i < family->stylen; i++) { int j; - char *weight = "", *slant = "", *width = ""; + const char *weight = "", *slant = "", *width = ""; WMListItem *item; for (j = 0; fontWeights[j].name; j++) diff --git a/WPrefs.app/WindowHandling.c b/WPrefs.app/WindowHandling.c index 4d514d91..c261067b 100644 --- a/WPrefs.app/WindowHandling.c +++ b/WPrefs.app/WindowHandling.c @@ -77,7 +77,7 @@ typedef struct _Panel { #define THUMB_SIZE 16 -static char *placements[] = { +static const char *placements[] = { "auto", "random", "manual", -- 2.11.4.GIT