1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Fixed const correctness in functions using 'wusergnusteppath'

The change introduced in previous commit for const correctness has
a small impact on WindowMaker's code, this patch fixes all the new
warnings.
This commit is contained in:
Christophe CURIS
2013-05-04 15:43:30 +02:00
committed by Carlos R. Mafra
parent cd1c55d63c
commit a18fd7cd69
6 changed files with 10 additions and 7 deletions

View File

@@ -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)

View File

@@ -83,7 +83,7 @@ const char *wusergnusteppath()
char *wdefaultspathfordomain(const char *domain)
{
char *path;
char *gspath;
const char *gspath;
size_t slen;
gspath = wusergnusteppath();

View File

@@ -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;

View File

@@ -1478,7 +1478,7 @@ static WMPropList *getDefaultMenu(_Panel * panel)
static void showData(_Panel * panel)
{
char *gspath;
const char *gspath;
char *menuPath;
WMPropList *pmenu;

View File

@@ -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();

View File

@@ -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;