Skip to content

Commit

Permalink
format checking
Browse files Browse the repository at this point in the history
Change-Id: Ibe20e9c1f423dee8fac93e3c9699af5b298ba34e
  • Loading branch information
cooljeanius committed Oct 1, 2024
1 parent 98ca446 commit 49bd8d0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ jobs:
if test -e info.js && test ! -e info.js.json; then \
(npx esparse info.js info.js.json) || (npx esvalidate info.js) \
|| (if test -x "$(which jsc)"; then jsc info.js; \
else echo "warning: jsc is missing"; fi); \
else echo "warning: jsc is missing!" >&2 && exit 1; fi); \
|| (node -c info.js) || (stat info.js && wc -l info.js); \
elif test -r info.js.json && test -w /dev/stdout; then \
stat info.js.json || echo "info.js.json"; \
elif test -r info.min.js && test -x "$(which du)"; then \
Expand Down
3 changes: 2 additions & 1 deletion src/gdb/ada-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ ada_parse(void)
void ATTR_NORETURN
yyerror(const char *msg)
{
error("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
error("A %s in expression, near '%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}
/* The operator name corresponding to operator symbol STRING (adds
Expand Down
3 changes: 2 additions & 1 deletion src/gdb/c-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,8 @@ yyerror(const char *msg)
if (prev_lexptr)
lexptr = prev_lexptr;

error("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
error("A %s in expression, near '%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}

/* End of c-exp.y */
3 changes: 2 additions & 1 deletion src/gdb/f-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,8 @@ yyerror(const char *msg)
if (prev_lexptr)
lexptr = prev_lexptr;

error("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
error("A %s in expression, near '%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}

/* End of f-exp.y */
10 changes: 5 additions & 5 deletions src/gdb/jv-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -1229,9 +1229,9 @@ yyerror(const char *msg)
lexptr = prev_lexptr;

if (msg)
error(_("%s: near `%s'"), msg, lexptr);
error(_("%s: near '%s'"), msg, (lexptr ? lexptr : "lexptr"));
else
error(_("error in expression, near `%s'"), lexptr);
error(_("error in expression, near '%s'"), (lexptr ? lexptr : "lexptr"));
}

static struct type *
Expand All @@ -1240,7 +1240,7 @@ java_type_from_name(struct stoken name)
char *tmp = copy_name(name);
struct type *typ = java_lookup_class(tmp);
if ((typ == NULL) || (TYPE_CODE(typ) != TYPE_CODE_STRUCT))
error(_("No class named `%s'"), tmp);
error(_("No class named '%s'"), (tmp ? tmp : "tmp"));
return typ;
}

Expand Down Expand Up @@ -1424,9 +1424,9 @@ push_expression_name(struct stoken name)
builtin_type_int);
}
else if (!have_full_symbols () && !have_partial_symbols ())
error (_("No symbol table is loaded. Use the \"file\" command"));
error(_("No symbol table is loaded. Use the \"file\" command"));
else
error (_("No symbol \"%s\" in current context"), tmp);
error(_("No symbol \"%s\" in current context"), (tmp ? tmp : "tmp"));
}

}
Expand Down
3 changes: 2 additions & 1 deletion src/gdb/m2-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,8 @@ yyerror(const char *msg)
if (prev_lexptr)
lexptr = prev_lexptr;

error("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
error("A %s in expression, near '%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}

/* End of m2-exp.y */
4 changes: 2 additions & 2 deletions src/gdb/objc-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -1936,8 +1936,8 @@ yyerror(const char *msg)
if (*lexptr == '\0')
error("A %s near end of expression.", (msg ? msg : "error"));
else
error("A %s in expression, near `%s'.", (msg ? msg : "error"),
lexptr);
error("A %s in expression, near '%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}

/* End of obj-exp.y */
3 changes: 2 additions & 1 deletion src/gdb/p-exp.y
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,8 @@ yyerror(const char *msg)
if (prev_lexptr)
lexptr = prev_lexptr;

error("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);
error("A %s in expression, near `%s'.", (msg ? msg : "error"),
(lexptr ? lexptr : "lexptr"));
}

/* End of p-exp.y */

0 comments on commit 49bd8d0

Please sign in to comment.