From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id 9053E3858C5E; Wed, 9 Nov 2022 17:34:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9053E3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668015298; bh=mQCVPxMt/ib0a77aPtmgOv5tJWJRbA2qaE49RusxPvc=; h=From:To:Subject:Date:From; b=h7GVF71nRxrz/33okEDe3nxT08lOUEPJ8Yr6gaFOVvT2S/LzF10AAtmgF2smBbXT8 vlckkrn1Rb8jW/ovU1g1JmU+5R3SG/sY1gX0kGEkApJdsvF6O+yJYze0TYSKcC4uK1 RnL4eK2duciK8i/cumu1vopqfufxvIzKXEpZwAIU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] sim: igen: add missing newline to various error messages X-Act-Checkin: binutils-gdb X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 959550953e9467b3aa3e168c8ea313e123626d9b X-Git-Newrev: 3abad2f6a637a0c56af70311d94ec66eea1b4852 Message-Id: <20221109173458.9053E3858C5E@sourceware.org> Date: Wed, 9 Nov 2022 17:34:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3abad2f6a637= a0c56af70311d94ec66eea1b4852 commit 3abad2f6a637a0c56af70311d94ec66eea1b4852 Author: Mike Frysinger Date: Thu Nov 10 00:29:27 2022 +0700 sim: igen: add missing newline to various error messages =20 The error() function expects a trailing newline in its message. Most callers do this already, so adding it to the few that don't. Diff: --- sim/igen/gen-support.c | 2 +- sim/igen/gen.c | 2 +- sim/igen/ld-insn.c | 2 +- sim/igen/misc.c | 2 +- sim/igen/misc.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sim/igen/gen-support.c b/sim/igen/gen-support.c index de5a507753a..d9d0f7c09a6 100644 --- a/sim/igen/gen-support.c +++ b/sim/igen/gen-support.c @@ -180,7 +180,7 @@ support_c_function (lf *file, function_entry * function= , void *data) lf_printf (file, "{\n"); lf_indent (file, +2); if (function->code =3D=3D NULL) - error (function->line, "Function without body (or null statement)"); + error (function->line, "Function without body (or null statement)\n"); lf_print__line_ref (file, function->code->line); table_print_code (file, function->code); if (function->is_internal) diff --git a/sim/igen/gen.c b/sim/igen/gen.c index d2a40d194b0..3882b5bd34a 100644 --- a/sim/igen/gen.c +++ b/sim/igen/gen.c @@ -987,7 +987,7 @@ gen_entry_expand_opcode (gen_entry *table, } if (bit =3D=3D NULL && t =3D=3D NULL) error (instruction->line, - "Conditional `%s' of field `%s' isn't expanded", + "Conditional `%s' of field `%s' isn't expanded\n", condition->string, field->val_string); switch (condition->test) { diff --git a/sim/igen/ld-insn.c b/sim/igen/ld-insn.c index 20c1f77b33f..435bf483efd 100644 --- a/sim/igen/ld-insn.c +++ b/sim/igen/ld-insn.c @@ -914,7 +914,7 @@ static table_entry * parse_macro_record (table *file, table_entry *record) { #if 1 - error (record->line, "Macros are not implemented"); + error (record->line, "Macros are not implemented\n"); #else /* parse the define record */ if (record->nr_fields < nr_define_fields) diff --git a/sim/igen/misc.c b/sim/igen/misc.c index 598f886d7ae..c5c494bb6b5 100644 --- a/sim/igen/misc.c +++ b/sim/igen/misc.c @@ -246,7 +246,7 @@ name2i (const char *names, const name_map * map) if (curr->i >=3D 0) return curr->i; else - error (NULL, "%s contains no valid names", names); + error (NULL, "%s contains no valid names\n", names); return 0; } =20 diff --git a/sim/igen/misc.h b/sim/igen/misc.h index a1cae768179..214505a761f 100644 --- a/sim/igen/misc.h +++ b/sim/igen/misc.h @@ -64,7 +64,7 @@ do { \ line_ref line; \ line.file_name =3D filter_filename (__FILE__); \ line.line_nr =3D __LINE__; \ - error (&line, EXPRESSION); \ + error (&line, EXPRESSION "\n"); \ } while (0) =20 #define ASSERT(EXPRESSION) \ @@ -73,7 +73,7 @@ do { \ line_ref line; \ line.file_name =3D filter_filename (__FILE__); \ line.line_nr =3D __LINE__; \ - error(&line, "assertion failed - %s\n", #EXPRESSION); \ + error (&line, "assertion failed - %s\n", #EXPRESSION); \ } \ } while (0)