summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-05-23 22:05:51 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-05-23 22:05:51 -0700
commit73c9e094f3307f1f29e05e4534a530335e5bd61f (patch)
treeadbc67fb7d57e264299e7c4bd0598223757505f3
parent8a8a30ce906cf6af7da54dccc88b04d49bd4c12b (diff)
downloadxorg-lib-libXp-73c9e094f3307f1f29e05e4534a530335e5bd61f.tar.gz
Add const qualifiers to silence gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/XpExtUtil.c4
-rw-r--r--src/XpExtUtil.h2
-rw-r--r--src/XpNotifyPdm.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/XpExtUtil.c b/src/XpExtUtil.c
index 30540d0..89f66c0 100644
--- a/src/XpExtUtil.c
+++ b/src/XpExtUtil.c
@@ -50,7 +50,7 @@
static XExtensionInfo xp_info_data;
static XExtensionInfo *xp_info = &xp_info_data;
-static /* const */ char *xp_extension_name = XP_PRINTNAME;
+static const char *xp_extension_name = XP_PRINTNAME;
static int XpClose(Display *, XExtCodes *);
static char *XpError(Display *, int, XExtCodes *, char *, int);
@@ -85,7 +85,7 @@ typedef struct _xpPrintData {
XPrintLocalExtensionVersion *vers;
} xpPrintData;
-static char *XpErrorList[ /* XP_ERRORS */ ] = {
+static const char *XpErrorList[ /* XP_ERRORS */ ] = {
"XPBadContext",
"XPBadSequence",
"XPBadResourceID"
diff --git a/src/XpExtUtil.h b/src/XpExtUtil.h
index 4b880ae..d479a95 100644
--- a/src/XpExtUtil.h
+++ b/src/XpExtUtil.h
@@ -45,7 +45,7 @@ extern int XpCheckExtInitUnlocked(
);
extern char *_xpstrdup(
- char * /* str */
+ const char * /* str */
);
_XFUNCPROTOEND
diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c
index 579923c..9fccfdd 100644
--- a/src/XpNotifyPdm.c
+++ b/src/XpNotifyPdm.c
@@ -68,7 +68,7 @@
/*
* str_dup using Xmalloc
*/
-char *_xpstrdup(char * str)
+char *_xpstrdup(const char * str)
{
int len;
char *newstr;
@@ -104,7 +104,7 @@ _XpGetSelectionServer (
char *tstr1, *tstr2, *tstr3, *tstrptr;
char *sel_displaystr;
Display *sel_display;
- char *selectionstr;
+ const char *selectionstr;
/*
@@ -727,7 +727,7 @@ XpNotifyPdm (
enum { XA_PDM_CLIENT_PROP, XA_PDM_START, XA_PDM_START_OK,
XA_PDM_START_VXAUTH, XA_PDM_START_PXAUTH, XA_PDM_START_ERROR,
NUM_ATOMS };
- static char *atom_names[] = {
+ static const char *atom_names[] = {
"PDM_CLIENT_PROP", "PDM_START", "PDM_START_OK",
"PDM_START_VXAUTH", "PDM_START_PXAUTH", "PDM_START_ERROR" };
@@ -791,7 +791,7 @@ XpNotifyPdm (
/*
* Create property and transfer data to.
*/
- XInternAtoms( sel_display, atom_names, NUM_ATOMS, False, atoms );
+ XInternAtoms( sel_display, (char **) atom_names, NUM_ATOMS, False, atoms );
XChangeProperty( sel_display,
sel_window, atoms[XA_PDM_CLIENT_PROP],