diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-10-20 12:36:31 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-01 22:17:43 -0700 |
commit | e3e6e938535532bfad175c1635256ab7fb3ac943 (patch) | |
tree | bc60fa3a3fee52cd431f65f1640160e177301654 | |
parent | 2458580ac95c550217b3376c46eecb2cca646241 (diff) |
Fix many const char * warnings from gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
-rw-r--r-- | action.c | 8 | ||||
-rw-r--r-- | action.h | 4 | ||||
-rw-r--r-- | compat.c | 2 | ||||
-rw-r--r-- | expr.c | 12 | ||||
-rw-r--r-- | geometry.c | 26 | ||||
-rw-r--r-- | indicators.c | 2 | ||||
-rw-r--r-- | indicators.h | 2 | ||||
-rw-r--r-- | keytypes.c | 2 | ||||
-rw-r--r-- | symbols.c | 8 |
9 files changed, 33 insertions, 33 deletions
@@ -41,7 +41,7 @@ static ExprDef constFalse; /***====================================================================***/ static Bool -stringToAction(char *str, unsigned *type_rtrn) +stringToAction(const char *str, unsigned *type_rtrn) { if (str == NULL) return False; @@ -134,7 +134,7 @@ stringToAction(char *str, unsigned *type_rtrn) } static Bool -stringToField(char *str, unsigned *field_rtrn) +stringToField(const char *str, unsigned *field_rtrn) { if (str == NULL) @@ -1397,8 +1397,8 @@ HandleActionDef(ExprDef * def, int SetActionField(XkbDescPtr xkb, - char *elem, - char *field, + const char *elem, + const char *field, ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn) { ActionInfo *new, *old; @@ -72,8 +72,8 @@ extern int HandleActionDef(ExprDef * /* def */ , ); extern int SetActionField(XkbDescPtr /* xkb */ , - char * /* elem */ , - char * /* field */ , + const char * /* elem */ , + const char * /* field */ , ExprDef * /* index */ , ExprDef * /* value */ , ActionInfo ** /* info_rtrn */ @@ -494,7 +494,7 @@ static LookupEntry useModMapValues[] = { static int SetInterpField(SymInterpInfo * si, XkbDescPtr xkb, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, CompatInfo * info) { int ok = 1; @@ -292,7 +292,7 @@ ExprResolveModIndex(ExprDef * expr, IdentLookupFunc lookup, XPointer lookupPriv) { int ok = 0; - char *bogus = NULL; + const char *bogus = NULL; switch (expr->op) { @@ -382,7 +382,7 @@ ExprResolveBoolean(ExprDef * expr, IdentLookupFunc lookup, XPointer lookupPriv) { int ok = 0; - char *bogus = NULL; + const char *bogus = NULL; switch (expr->op) { @@ -715,7 +715,7 @@ ExprResolveString(ExprDef * expr, ExprResult leftRtrn, rightRtrn; ExprDef *left; ExprDef *right; - char *bogus = NULL; + const char *bogus = NULL; switch (expr->op) { @@ -729,7 +729,7 @@ ExprResolveString(ExprDef * expr, val_rtrn->str = XkbAtomGetString(NULL, expr->value.str); if (val_rtrn->str == NULL) { - static char *empty = ""; + static const char *empty = ""; val_rtrn->str = empty; } return True; @@ -822,7 +822,7 @@ ExprResolveKeyName(ExprDef * expr, int ok = 0; ExprDef *left; ExprResult leftRtrn; - char *bogus = NULL; + const char *bogus = NULL; switch (expr->op) { @@ -941,7 +941,7 @@ ExprResolveMask(ExprDef * expr, int ok = 0; ExprResult leftRtrn, rightRtrn; ExprDef *left, *right; - char *bogus = NULL; + const char *bogus = NULL; switch (expr->op) { @@ -967,7 +967,7 @@ AddDoodad(SectionInfo * si, GeometryInfo * info, DoodadInfo * new) } static DoodadInfo * -FindDfltDoodadByTypeName(char *name, SectionInfo * si, GeometryInfo * info) +FindDfltDoodadByTypeName(const char *name, SectionInfo *si, GeometryInfo *info) { DoodadInfo *dflt; unsigned type; @@ -1408,7 +1408,7 @@ HandleIncludeGeometry(IncludeStmt * stmt, XkbDescPtr xkb, GeometryInfo * info, static int SetShapeField(ShapeInfo * si, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) { ExprResult tmp; @@ -1440,7 +1440,7 @@ SetShapeField(ShapeInfo * si, static int SetShapeDoodadField(DoodadInfo * di, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SectionInfo * si, GeometryInfo * info) { @@ -1510,14 +1510,14 @@ SetShapeDoodadField(DoodadInfo * di, static int SetTextDoodadField(DoodadInfo * di, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SectionInfo * si, GeometryInfo * info) { ExprResult tmp; unsigned def; unsigned type; - char *typeName = "text doodad"; + const char *typeName = "text doodad"; union { Atom *str; @@ -1660,7 +1660,7 @@ SetTextDoodadField(DoodadInfo * di, static int SetIndicatorDoodadField(DoodadInfo * di, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SectionInfo * si, GeometryInfo * info) @@ -1705,12 +1705,12 @@ SetIndicatorDoodadField(DoodadInfo * di, static int SetLogoDoodadField(DoodadInfo * di, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SectionInfo * si, GeometryInfo * info) { ExprResult tmp; - char *typeName = "logo doodad"; + const char *typeName = "logo doodad"; if ((!uStrCaseCmp(field, "corner")) || (!uStrCaseCmp(field, "cornerradius"))) @@ -1786,7 +1786,7 @@ SetLogoDoodadField(DoodadInfo * di, static int SetDoodadField(DoodadInfo * di, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SectionInfo * si, GeometryInfo * info) { @@ -1889,7 +1889,7 @@ SetDoodadField(DoodadInfo * di, static int SetSectionField(SectionInfo * si, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) { unsigned short *pField; @@ -1977,7 +1977,7 @@ SetSectionField(SectionInfo * si, static int SetRowField(RowInfo * row, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, GeometryInfo * info) { ExprResult tmp; @@ -2841,7 +2841,7 @@ HandleGeometryFile(XkbFile * file, XkbDescPtr xkb, unsigned merge, GeometryInfo * info) { ParseCommon *stmt; - char *failWhat; + const char *failWhat; if (merge == MergeDefault) merge = MergeAugment; @@ -3273,7 +3273,7 @@ FontFromParts(Atom fontTok, Atom setWidthTok, Atom varTok, int size, Atom encodingTok) { int totalSize; - char *font, *weight, *slant, *setWidth, *variant, *encoding; + const char *font, *weight, *slant, *setWidth, *variant, *encoding; char *rtrn; font = (fontTok != None ? XkbAtomGetString(NULL, fontTok) : DFLT_FONT); diff --git a/indicators.c b/indicators.c index d4a362f..421ad58 100644 --- a/indicators.c +++ b/indicators.c @@ -200,7 +200,7 @@ static LookupEntry groupComponentNames[] = { int SetIndicatorMapField(LEDInfo * led, XkbDescPtr xkb, - char *field, ExprDef * arrayNdx, ExprDef * value) + const char *field, ExprDef *arrayNdx, ExprDef *value) { ExprResult rtrn; Bool ok; diff --git a/indicators.h b/indicators.h index 35ae38a..8e7884d 100644 --- a/indicators.h +++ b/indicators.h @@ -62,7 +62,7 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ , extern int SetIndicatorMapField(LEDInfo * /* led */ , XkbDescPtr /* xkb */ , - char * /* field */ , + const char * /* field */ , ExprDef * /* arrayNdx */ , ExprDef * /* value */ ); @@ -879,7 +879,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value) static Bool SetKeyTypeField(KeyTypeInfo * type, XkbDescPtr xkb, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info) { ExprResult tmp; @@ -928,7 +928,7 @@ GetGroupIndex(KeyInfo * key, static Bool AddSymbolsToKey(KeyInfo * key, XkbDescPtr xkb, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) { unsigned ndx, nSyms; @@ -982,7 +982,7 @@ AddSymbolsToKey(KeyInfo * key, static Bool AddActionsToKey(KeyInfo * key, XkbDescPtr xkb, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) { register int i; @@ -1118,7 +1118,7 @@ static LookupEntry rgEntries[] = { static Bool SetSymbolsField(KeyInfo * key, XkbDescPtr xkb, - char *field, + const char *field, ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info) { Bool ok = True; @@ -1235,7 +1235,7 @@ SetSymbolsField(KeyInfo * key, uStrCasePrefix("permanentoverlay", field)) { Bool permanent = False; - char *which; + const char *which; int overlayNdx; if (uStrCasePrefix("permanent", field)) { |