summaryrefslogtreecommitdiff
path: root/src/bitmap
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-02 09:16:05 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-11 20:15:06 -0800
commit3715cd752bac912a56aa1cbb9dd874624a709aab (patch)
tree2558e6031d81d08dbf35b6b8ecf6060a0487548c /src/bitmap
parent8d130ac0fcf19e0e0dd0a404d9317fd8860baad4 (diff)
downloadxorg-lib-libXfont-3715cd752bac912a56aa1cbb9dd874624a709aab.tar.gz
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src/bitmap')
-rw-r--r--src/bitmap/bdfutils.c12
-rw-r--r--src/bitmap/bitscale.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/bitmap/bdfutils.c b/src/bitmap/bdfutils.c
index a0106b7..3a3ee26 100644
--- a/src/bitmap/bdfutils.c
+++ b/src/bitmap/bdfutils.c
@@ -68,7 +68,7 @@ int bdfFileLineNum;
/***====================================================================***/
void
-bdfError(char* message, ...)
+bdfError(const char* message, ...)
{
va_list args;
@@ -81,7 +81,7 @@ bdfError(char* message, ...)
/***====================================================================***/
void
-bdfWarning(char *message, ...)
+bdfWarning(const char *message, ...)
{
va_list args;
@@ -127,7 +127,7 @@ bdfGetLine(FontFilePtr file, unsigned char *buf, int len)
/***====================================================================***/
Atom
-bdfForceMakeAtom(char *str, int *size)
+bdfForceMakeAtom(const char *str, int *size)
{
register int len = strlen(str);
Atom the_atom;
@@ -249,7 +249,7 @@ bdfHexByte(unsigned char *s)
* check for known special property values
*/
-static char *SpecialAtoms[] = {
+static const char *SpecialAtoms[] = {
"FONT_ASCENT",
#define BDF_FONT_ASCENT 0
"FONT_DESCENT",
@@ -279,8 +279,8 @@ Bool
bdfSpecialProperty(FontPtr pFont, FontPropPtr prop,
char isString, bdfFileState *bdfState)
{
- char **special;
- char *name;
+ const char **special;
+ const char *name;
name = NameForAtom(prop->name);
for (special = SpecialAtoms; *special; special++)
diff --git a/src/bitmap/bitscale.c b/src/bitmap/bitscale.c
index b857237..e89ba7c 100644
--- a/src/bitmap/bitscale.c
+++ b/src/bitmap/bitscale.c
@@ -78,7 +78,7 @@ enum scaleType {
};
typedef struct _fontProp {
- char *name;
+ const char *name;
Atom atom;
enum scaleType type;
} fontProp;