From: Christophe CURIS <[email protected]>

The change introduced in previous commit for const correctness has
a small impact on WindowMaker's code, this patch fixes all the new
warnings.
---
 WINGs/proplist.c     |    5 +++--
 WINGs/userdefaults.c |    2 +-
 WINGs/wapplication.c |    2 +-
 WPrefs.app/Menu.c    |    2 +-
 src/icon.c           |    3 ++-
 util/getstyle.c      |    3 ++-
 6 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/WINGs/proplist.c b/WINGs/proplist.c
index bb5e057..bd452e3 100644
--- a/WINGs/proplist.c
+++ b/WINGs/proplist.c
@@ -1706,7 +1706,8 @@ Bool WMWritePropListToFile(WMPropList * plist, const char 
*path)
  */
 int wmkdirhier(const char *path)
 {
-       char *t, *thePath = NULL, buf[1024];
+       const char *t;
+       char *thePath = NULL, buf[1024];
        size_t p, plen;
        struct stat st;
 
@@ -1799,7 +1800,7 @@ int wrmdirhier(const char *path)
 {
        struct stat st;
        int error;
-       char *t;
+       const char *t;
 
        /* Only remove directories under $GNUSTEP_USER_ROOT */
        if ((t = wusergnusteppath()) == NULL)
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 112f1f7..c1b4652 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -83,7 +83,7 @@ const char *wusergnusteppath()
 char *wdefaultspathfordomain(const char *domain)
 {
        char *path;
-       char *gspath;
+       const char *gspath;
        size_t slen;
 
        gspath = wusergnusteppath();
diff --git a/WINGs/wapplication.c b/WINGs/wapplication.c
index 070e0a9..974441f 100644
--- a/WINGs/wapplication.c
+++ b/WINGs/wapplication.c
@@ -61,7 +61,7 @@ char *WMGetApplicationName()
        return WMApplication.applicationName;
 }
 
-static char *checkFile(char *path, char *folder, char *ext, char *resource)
+static char *checkFile(const char *path, const char *folder, const char *ext, 
const char *resource)
 {
        char *ret;
        int extralen;
diff --git a/WPrefs.app/Menu.c b/WPrefs.app/Menu.c
index 3edb84a..7780df1 100644
--- a/WPrefs.app/Menu.c
+++ b/WPrefs.app/Menu.c
@@ -1478,7 +1478,7 @@ static WMPropList *getDefaultMenu(_Panel * panel)
 
 static void showData(_Panel * panel)
 {
-       char *gspath;
+       const char *gspath;
        char *menuPath;
        WMPropList *pmenu;
 
diff --git a/src/icon.c b/src/icon.c
index 1033734..95d3dd7 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -416,7 +416,8 @@ char *get_name_for_instance_class(char *wm_instance, char 
*wm_class)
 
 static char *get_icon_cache_path(void)
 {
-       char *prefix, *path;
+       const char *prefix;
+       char *path;
        int len, ret;
 
        prefix = wusergnusteppath();
diff --git a/util/getstyle.c b/util/getstyle.c
index e9ee696..6c397b4 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -185,7 +185,8 @@ void makeThemePack(WMPropList * style, char *themeName)
        WMPropList *value;
        int i;
        size_t themeNameLen;
-       char *themeDir, *t;
+       char *themeDir;
+       const char *t;
 
        if ((t = wusergnusteppath()) == NULL)
                return;
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to