diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-05-31 12:43:04 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-05-31 12:48:55 -0700 |
commit | 55a26c49c8a976abb0ead8bd58da6260de61b739 (patch) | |
tree | 1d9bee988887fae4d4db9cf46da4c634b86dffe7 /src | |
parent | ee3dcf350b5621d7965a8b8185a3dc534bcc46c7 (diff) |
Make some char pointers const as necessary to clear some gcc warnings
twm.c:544:20: warning: assignment discards ‘const’ qualifier from
pointer target type [-Wdiscarded-qualifiers]
Scr->iconmgr.name = "TWM";
^
twm.c:545:25: warning: assignment discards ‘const’ qualifier from
pointer target type [-Wdiscarded-qualifiers]
Scr->iconmgr.icon_name = "Icons";
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/iconmgr.c | 2 | ||||
-rw-r--r-- | src/iconmgr.h | 6 | ||||
-rw-r--r-- | src/list.c | 6 | ||||
-rw-r--r-- | src/list.h | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/iconmgr.c b/src/iconmgr.c index d9c4e76..ca7b307 100644 --- a/src/iconmgr.c +++ b/src/iconmgr.c @@ -61,7 +61,7 @@ CreateIconManagers(void) char str[100]; char str1[100]; Pixel background; - char *icon_name; + const char *icon_name; if (Scr->NoIconManagers) return; diff --git a/src/iconmgr.h b/src/iconmgr.h index 8d7c66f..6157fa3 100644 --- a/src/iconmgr.h +++ b/src/iconmgr.h @@ -62,9 +62,9 @@ typedef struct IconMgr TwmWindow *twm_win; /* back pointer to the new parent */ struct ScreenInfo *scr; /* the screen this thing is on */ Window w; /* this icon manager window */ - char *geometry; /* geometry string */ - char *name; - char *icon_name; + const char *geometry; /* geometry string */ + const char *name; + const char *icon_name; int x, y, width, height; int columns, cur_rows, cur_columns; int count; @@ -117,7 +117,7 @@ AddToList(name_list **list_head, char *name, char *ptr) * \param class a pointer to the class to look for */ char * -LookInList(name_list *list_head, char *name, XClassHint *class) +LookInList(name_list *list_head, const char *name, XClassHint *class) { name_list *nptr; @@ -142,7 +142,7 @@ LookInList(name_list *list_head, char *name, XClassHint *class) } char * -LookInNameList(name_list *list_head, char *name) +LookInNameList(name_list *list_head, const char *name) { return (LookInList(list_head, name, NULL)); } @@ -158,7 +158,7 @@ LookInNameList(name_list *list_head, char *name) * \param class a pointer to the class to look for * \param[out] ptr fill in the list value if the name was found */ -int GetColorFromList(name_list *list_head, char *name, XClassHint *class, +int GetColorFromList(name_list *list_head, const char *name, XClassHint *class, Pixel *ptr) { int save; @@ -70,11 +70,11 @@ typedef struct name_list_struct name_list; extern void AddToList ( name_list **list_head, char *name, char *ptr ); extern void FreeList ( name_list **list ); -extern int GetColorFromList ( name_list *list_head, char *name, +extern int GetColorFromList ( name_list *list_head, const char *name, XClassHint *class, Pixel *ptr ); -extern char * LookInList ( name_list *list_head, char *name, +extern char * LookInList ( name_list *list_head, const char *name, XClassHint *class ); -extern char * LookInNameList ( name_list *list_head, char *name ); +extern char * LookInNameList ( name_list *list_head, const char *name ); #endif /* _LIST_ */ |