]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: igen: add missing newline to various error messages
authorMike Frysinger <vapier@gentoo.org>
Wed, 9 Nov 2022 17:29:27 +0000 (00:29 +0700)
committerMike Frysinger <vapier@gentoo.org>
Wed, 9 Nov 2022 17:29:27 +0000 (00:29 +0700)
The error() function expects a trailing newline in its message.
Most callers do this already, so adding it to the few that don't.

sim/igen/gen-support.c
sim/igen/gen.c
sim/igen/ld-insn.c
sim/igen/misc.c
sim/igen/misc.h

index de5a507753a10215310ee772410f59dd6999dc02..d9d0f7c09a659c6dee4ef68fb3ffd854c2f6d580 100644 (file)
@@ -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 == 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)
index d2a40d194b03ffd41bb122ed82d6c8230dd223b0..3882b5bd34a269d7aaff20389bce4af3ae910137 100644 (file)
@@ -987,7 +987,7 @@ gen_entry_expand_opcode (gen_entry *table,
                                }
                              if (bit == NULL && t == 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)
                                {
index 20c1f77b33fbb231da3b6fa0f501a10eb2dc4002..435bf483efd7bb0271063624c0ccf503e67975d6 100644 (file)
@@ -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)
index 598f886d7ae00a1afa1be8e807cdf21eb8d9b9f4..c5c494bb6b5ca3bbcea4cfeb516ce11de4e07ae7 100644 (file)
@@ -246,7 +246,7 @@ name2i (const char *names, const name_map * map)
   if (curr->i >= 0)
     return curr->i;
   else
-    error (NULL, "%s contains no valid names", names);
+    error (NULL, "%s contains no valid names\n", names);
   return 0;
 }
 
index a1cae768179f1e2695c12c52dfbf7056603c9a01..214505a761fb90c12be9235c951600e4df997db0 100644 (file)
@@ -64,7 +64,7 @@ do { \
   line_ref line; \
   line.file_name = filter_filename (__FILE__); \
   line.line_nr = __LINE__; \
-  error (&line, EXPRESSION); \
+  error (&line, EXPRESSION "\n"); \
 } while (0)
 
 #define ASSERT(EXPRESSION) \
@@ -73,7 +73,7 @@ do { \
     line_ref line; \
     line.file_name = filter_filename (__FILE__); \
     line.line_nr = __LINE__; \
-    error(&line, "assertion failed - %s\n", #EXPRESSION); \
+    error (&line, "assertion failed - %s\n", #EXPRESSION); \
   } \
 } while (0)