| @@ -719,27 +719,28 @@ ExprResolveString(ExprDef * expr, | | | @@ -719,27 +719,28 @@ ExprResolveString(ExprDef * expr, |
719 | | | 719 | |
720 | switch (expr->op) | | 720 | switch (expr->op) |
721 | { | | 721 | { |
722 | case ExprValue: | | 722 | case ExprValue: |
723 | if (expr->type != TypeString) | | 723 | if (expr->type != TypeString) |
724 | { | | 724 | { |
725 | ERROR1("Found constant of type %s, expected a string\n", | | 725 | ERROR1("Found constant of type %s, expected a string\n", |
726 | exprTypeText(expr->type)); | | 726 | exprTypeText(expr->type)); |
727 | return False; | | 727 | return False; |
728 | } | | 728 | } |
729 | val_rtrn->str = XkbAtomGetString(NULL, expr->value.str); | | 729 | val_rtrn->str = XkbAtomGetString(NULL, expr->value.str); |
730 | if (val_rtrn->str == NULL) | | 730 | if (val_rtrn->str == NULL) |
731 | { | | 731 | { |
732 | static const char *empty = ""; | | 732 | static char empty_char = '\0'; |
| | | 733 | char *empty = &empty_char; |
733 | val_rtrn->str = empty; | | 734 | val_rtrn->str = empty; |
734 | } | | 735 | } |
735 | return True; | | 736 | return True; |
736 | case ExprIdent: | | 737 | case ExprIdent: |
737 | if (lookup) | | 738 | if (lookup) |
738 | { | | 739 | { |
739 | ok = (*lookup) (lookupPriv, | | 740 | ok = (*lookup) (lookupPriv, |
740 | None, expr->value.str, TypeString, val_rtrn); | | 741 | None, expr->value.str, TypeString, val_rtrn); |
741 | } | | 742 | } |
742 | if (!ok) | | 743 | if (!ok) |
743 | ERROR1("Identifier \"%s\" of type string not found\n", | | 744 | ERROR1("Identifier \"%s\" of type string not found\n", |
744 | XkbAtomText(NULL, expr->value.str, XkbMessage)); | | 745 | XkbAtomText(NULL, expr->value.str, XkbMessage)); |
745 | return ok; | | 746 | return ok; |