mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +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:
committed by
Carlos R. Mafra
parent
cd1c55d63c
commit
a18fd7cd69
@@ -1706,7 +1706,8 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
*/
|
*/
|
||||||
int wmkdirhier(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;
|
size_t p, plen;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
@@ -1799,7 +1800,7 @@ int wrmdirhier(const char *path)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int error;
|
int error;
|
||||||
char *t;
|
const char *t;
|
||||||
|
|
||||||
/* Only remove directories under $GNUSTEP_USER_ROOT */
|
/* Only remove directories under $GNUSTEP_USER_ROOT */
|
||||||
if ((t = wusergnusteppath()) == NULL)
|
if ((t = wusergnusteppath()) == NULL)
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const char *wusergnusteppath()
|
|||||||
char *wdefaultspathfordomain(const char *domain)
|
char *wdefaultspathfordomain(const char *domain)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
char *gspath;
|
const char *gspath;
|
||||||
size_t slen;
|
size_t slen;
|
||||||
|
|
||||||
gspath = wusergnusteppath();
|
gspath = wusergnusteppath();
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ char *WMGetApplicationName()
|
|||||||
return WMApplication.applicationName;
|
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;
|
char *ret;
|
||||||
int extralen;
|
int extralen;
|
||||||
|
|||||||
@@ -1478,7 +1478,7 @@ static WMPropList *getDefaultMenu(_Panel * panel)
|
|||||||
|
|
||||||
static void showData(_Panel * panel)
|
static void showData(_Panel * panel)
|
||||||
{
|
{
|
||||||
char *gspath;
|
const char *gspath;
|
||||||
char *menuPath;
|
char *menuPath;
|
||||||
WMPropList *pmenu;
|
WMPropList *pmenu;
|
||||||
|
|
||||||
|
|||||||
@@ -416,7 +416,8 @@ char *get_name_for_instance_class(char *wm_instance, char *wm_class)
|
|||||||
|
|
||||||
static char *get_icon_cache_path(void)
|
static char *get_icon_cache_path(void)
|
||||||
{
|
{
|
||||||
char *prefix, *path;
|
const char *prefix;
|
||||||
|
char *path;
|
||||||
int len, ret;
|
int len, ret;
|
||||||
|
|
||||||
prefix = wusergnusteppath();
|
prefix = wusergnusteppath();
|
||||||
|
|||||||
@@ -185,7 +185,8 @@ void makeThemePack(WMPropList * style, char *themeName)
|
|||||||
WMPropList *value;
|
WMPropList *value;
|
||||||
int i;
|
int i;
|
||||||
size_t themeNameLen;
|
size_t themeNameLen;
|
||||||
char *themeDir, *t;
|
char *themeDir;
|
||||||
|
const char *t;
|
||||||
|
|
||||||
if ((t = wusergnusteppath()) == NULL)
|
if ((t = wusergnusteppath()) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user