+2021-07-01 Mike Frysinger <vapier@gentoo.org>
+
+ * mep-asm.c (macros): Mark static & const.
+ (lookup_macro): Change return & m to const.
+ (expand_macro): Change mac to const.
+ (expand_string): Change pmacro to const.
+
2021-07-01 Mike Frysinger <vapier@gentoo.org>
* nds32-asm.c (operand_fields): Rename to ...
int len;
} arg;
-macro macros[] =
+static macro const macros[] =
{
{ "sizeof", "(`1.end + (- `1))"},
{ "startof", "(`1 | 0)" },
return strncat (new_dest, input, len);
}
-static macro *
+static const macro *
lookup_macro (const char *name)
{
- macro *m;
+ const macro *m;
for (m = macros; m->name; ++m)
if (strncmp (m->name, name, strlen(m->name)) == 0)
}
static char *
-expand_macro (arg *args, int narg, macro *mac)
+expand_macro (arg *args, int narg, const macro *mac)
{
char *result = 0, *rescanned_result = 0;
char *e = mac->expansion;
arg args[MAXARGS];
int state = IN_TEXT;
const char *mark = in;
- macro *pmacro = NULL;
+ const macro *pmacro = NULL;
char *expansion = 0;
char *result = 0;