Fix missing new-line and redundant trailing dot in WARN messages
authorIvan Maidanski <ivmai@mail.ru>
Fri, 22 Jul 2016 16:52:34 +0000 (19:52 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 22 Jul 2016 16:52:34 +0000 (19:52 +0300)
* allchblk.c (GC_get_first_part, GC_allochblk_nth): Remove '.'
before '\n' in WARN message.
* os_dep.c (GC_read_dirty, GC_mprotect_thread, GC_dirty_init):
Likewise.
* win32_threads.c (GC_start_mark_threads_inner): Likewise.
* alloc.c (GC_collect_or_expand): Remove space before '...' in WARN
message.
* dyn_load.c (GC_register_dynlib_callback): Add '\n' at the end of WARN
message.
* os_dep.c (GC_unix_mmap_get_mem, GC_unix_mmap_get_mem): Likewise.

allchblk.c
alloc.c
dyn_load.c
os_dep.c
win32_threads.c

index 8ae1f67..387aa44 100644 (file)
@@ -500,7 +500,7 @@ STATIC struct hblk * GC_get_first_part(struct hblk *h, hdr *hhdr,
     rest_hdr = GC_install_header(rest);
     if (0 == rest_hdr) {
         /* FIXME: This is likely to be very bad news ... */
-        WARN("Header allocation failed: Dropping block.\n", 0);
+        WARN("Header allocation failed: dropping block\n", 0);
         return(0);
     }
     rest_hdr -> hb_sz = total_size - bytes;
@@ -721,7 +721,7 @@ GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n, int may_split)
                     >= GC_large_alloc_warn_interval) {
                   WARN("Repeated allocation of very large block "
                        "(appr. size %" WARN_PRIdPTR "):\n"
-                       "\tMay lead to memory leak and poor performance.\n",
+                       "\tMay lead to memory leak and poor performance\n",
                        size_needed);
                   GC_large_alloc_warn_suppressed = 0;
                 }
diff --git a/alloc.c b/alloc.c
index 4a2cf3c..41e4a80 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -1384,7 +1384,7 @@ GC_INNER GC_bool GC_collect_or_expand(word needed_blocks,
         GC_gcollect_inner();
         GC_ASSERT(GC_bytes_allocd == 0);
       } else if (GC_fail_count++ < GC_max_retries) {
-        WARN("Out of Memory!  Trying to continue ...\n", 0);
+        WARN("Out of Memory!  Trying to continue...\n", 0);
         GC_gcollect_inner();
       } else {
 #       if !defined(AMIGA) || !defined(GC_AMIGA_FASTALLOC)
index 0afdb86..b6880ab 100644 (file)
@@ -507,7 +507,7 @@ STATIC int GC_register_dynlib_callback(struct dl_phdr_info * info,
                 break;
               }
               if (j == 0) WARN("Failed to find PT_GNU_RELRO segment"
-                               " inside PT_LOAD region", 0);
+                               " inside PT_LOAD region\n", 0);
             }
         }
 
index f87ce68..585982c 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -2043,7 +2043,7 @@ STATIC ptr_t GC_unix_mmap_get_mem(word bytes)
           if (zero_fd == -1)
             ABORT("Could not open /dev/zero");
           if (fcntl(zero_fd, F_SETFD, FD_CLOEXEC) == -1)
-            WARN("Could not set FD_CLOEXEC for /dev/zero", 0);
+            WARN("Could not set FD_CLOEXEC for /dev/zero\n", 0);
 
           initialized = TRUE;
       }
@@ -3530,7 +3530,7 @@ GC_INNER void GC_dirty_init(void)
       ABORT("/proc open failed");
     }
     if (syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC) == -1)
-      WARN("Could not set FD_CLOEXEC for /proc", 0);
+      WARN("Could not set FD_CLOEXEC for /proc\n", 0);
 
     GC_dirty_maintained = TRUE;
     GC_proc_buf = GC_scratch_alloc(GC_proc_buf_size);
@@ -3610,7 +3610,7 @@ GC_INNER void GC_read_dirty(void)
         bufp = (char *)(((word)bufp + (sizeof(long)-1)) & ~(sizeof(long)-1));
     }
 #   ifdef DEBUG_DIRTY_BITS
-      GC_log_printf("Proc VDB read done.\n");
+      GC_log_printf("Proc VDB read done\n");
 #   endif
 
     /* Update GC_written_pages. */
@@ -3975,7 +3975,7 @@ STATIC void *GC_mprotect_thread(void *arg)
       ABORT("Got more than 8 SIGBUSs in a row!");
     } else {
       GC_sigbus_count++;
-      WARN("Ignoring SIGBUS.\n", 0);
+      WARN("Ignoring SIGBUS\n", 0);
     }
   }
 #endif /* BROKEN_EXCEPTION_HANDLING */
@@ -4006,7 +4006,7 @@ GC_INNER void GC_dirty_init(void)
                         " virtual dirty bit implementation\n");
 # ifdef BROKEN_EXCEPTION_HANDLING
     WARN("Enabling workarounds for various darwin "
-         "exception handling bugs.\n", 0);
+         "exception handling bugs\n", 0);
 # endif
   GC_dirty_maintained = TRUE;
   if (GC_page_size % HBLKSIZE != 0) {
index c4f7e92..0541bca 100644 (file)
@@ -1810,7 +1810,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
         marker_last_stack_min[i] = ADDR_LIMIT;
         if (0 != pthread_create(&new_thread, &attr,
                                 GC_mark_thread, (void *)(word)i)) {
-          WARN("Marker thread creation failed.\n", 0);
+          WARN("Marker thread creation failed\n", 0);
           /* Don't try to create other marker threads.    */
           break;
         }