summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-02-02 19:25:14 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-02-03 10:06:00 -0800
commit5623c27700b7b23a8dbbd8c8f45e5d4fa0c667e3 (patch)
tree5ef32d8457f859742bcf2aa12019306db49d5c25 /hw
parent6869efae74381e5305b2d6517bf286e3ef7fdcb7 (diff)
Constify atom name strings
Changes MakeAtom to take a const char * and NameForAtom to return them, since many callers pass pointers to constant strings stored in read-only ELF sections. Updates in-tree callers as necessary to clear const mismatch warnings introduced by this change. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/dmxfont.c4
-rw-r--r--hw/kdrive/ephyr/ephyrvideo.c2
-rw-r--r--hw/xnest/Font.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/hw/dmx/dmxfont.c b/hw/dmx/dmxfont.c
index b70f7d2df..c33aee79a 100644
--- a/hw/dmx/dmxfont.c
+++ b/hw/dmx/dmxfont.c
@@ -253,7 +253,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont)
{
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
dmxFontPrivPtr pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
- char *name;
+ const char *name;
char **oldFontPath = NULL;
int nOldPaths;
Atom name_atom, value_atom;
@@ -415,7 +415,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont)
}
if (!value_atom) return FALSE;
- name = (char *)NameForAtom(value_atom);
+ name = NameForAtom(value_atom);
if (!name) return FALSE;
pFontPriv->font[pScreen->myNum] =
diff --git a/hw/kdrive/ephyr/ephyrvideo.c b/hw/kdrive/ephyr/ephyrvideo.c
index c4eb06607..5058ebe03 100644
--- a/hw/kdrive/ephyr/ephyrvideo.c
+++ b/hw/kdrive/ephyr/ephyrvideo.c
@@ -236,7 +236,7 @@ DoSimpleClip (BoxPtr a_dst_box,
static Bool
ephyrLocalAtomToHost (int a_local_atom, int *a_host_atom)
{
- char *atom_name=NULL;
+ const char *atom_name=NULL;
int host_atom=None ;
EPHYR_RETURN_VAL_IF_FAIL (a_host_atom, FALSE) ;
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index 26faf1633..7b388f0f4 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -40,7 +40,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
int nprops;
FontPropPtr props;
int i;
- char *name;
+ const char *name;
FontSetPrivate(pFont, xnestFontPrivateIndex, NULL);
@@ -58,7 +58,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont)
if (!value_atom) return False;
- name = (char *)NameForAtom(value_atom);
+ name = NameForAtom(value_atom);
if (!name) return False;