summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-26 21:34:01 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-12-02 11:19:38 -0800
commitc715abbca4885d03e8f9d6b71cf8fb54e5be5667 (patch)
treef716307e0d5be4bd0a23e168e2d8378f988ffabd
parent93fcd59757e87cb79db8a98e0379c0a90eddae4c (diff)
Fix const char * warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-rw-r--r--SCCDFile.h2
-rw-r--r--loadData.c15
-rw-r--r--xcmsdb.c6
3 files changed, 12 insertions, 11 deletions
diff --git a/SCCDFile.h b/SCCDFile.h
index a9a7722..41a51bf 100644
--- a/SCCDFile.h
+++ b/SCCDFile.h
@@ -139,7 +139,7 @@ typedef struct _XDCCC_Correction {
struct _XDCCC_Correction* next;
} XDCCC_Correction;
-extern int LoadSCCData(Display *pDpy, int screenNumber, char *filename,
+extern int LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
int targetFormat);
#endif /* SCCDFILE_H */
diff --git a/loadData.c b/loadData.c
index a0a2a58..170d9e0 100644
--- a/loadData.c
+++ b/loadData.c
@@ -62,7 +62,7 @@
*/
typedef struct _DefineEntry {
- char *pString;
+ const char *pString;
int define;
} DefineEntry;
@@ -151,7 +151,7 @@ static DefineEntry VisualClassTbl[] = {
static int
StrToDefine(DefineEntry pde[], /* IN: table of X string-define pairs */
/* last entry must contain pair "", 0 */
- char *pstring) /* IN: string to be looked up in that table */
+ const char *pstring) /* IN: string to be looked up in that table */
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -184,7 +184,7 @@ StrToDefine(DefineEntry pde[], /* IN: table of X string-define pairs */
*
* SYNOPSIS
*/
-static char *
+static const char *
DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */
/* last entry must contain pair "", 0 */
int id) /* IN: id to be looked up in that table */
@@ -221,7 +221,7 @@ DefineToStr(DefineEntry pde[], /* IN: table of X string-define pairs */
* SYNOPSIS
*/
static int
-SCKeyOf(char *string)
+SCKeyOf(const char *string)
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -250,7 +250,7 @@ SCKeyOf(char *string)
* SYNOPSIS
*/
static int
-SCScrnClassOf(char *string)
+SCScrnClassOf(const char *string)
/*
* DESCRIPTION
* Converts a string to an integer define.
@@ -278,7 +278,7 @@ SCScrnClassOf(char *string)
*
* SYNOPSIS
*/
-static char *
+static const char *
SCScrnClassStringOf(int id)
/*
* DESCRIPTION
@@ -1417,7 +1417,8 @@ ParseVisualOptions(Display *pDpy, XDCCC_Correction *pCorrection, char *pbuf)
* SYNOPSIS
*/
int
-LoadSCCData(Display *pDpy, int screenNumber, char *filename, int targetFormat)
+LoadSCCData(Display *pDpy, int screenNumber, const char *filename,
+ int targetFormat)
/*
* DESCRIPTION
diff --git a/xcmsdb.c b/xcmsdb.c
index 973c6ab..b1ec2ce 100644
--- a/xcmsdb.c
+++ b/xcmsdb.c
@@ -87,7 +87,7 @@ MissingArg (const char *option)
}
static Bool
-optionmatch(char *opt, char *arg, int minlen)
+optionmatch(const char *opt, const char *arg, int minlen)
{
int arglen;
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
static Atom
-ParseAtom(Display *dpy, char *name, int only_flag)
+ParseAtom(Display *dpy, const char *name, int only_flag)
{
return(XInternAtom(dpy, name, only_flag));
}
@@ -348,7 +348,7 @@ QuerySCCDataRGB(Display *dpy, Window root)
VisualID visualID;
XVisualInfo vinfo_template, *vinfo_ret;
int nvis;
- static char *visual_strings[] = {
+ static const char *visual_strings[] = {
"StaticGray",
"GrayScale",
"StaticColor",