From: Ivan Maidanski Date: Fri, 22 Jul 2016 16:52:34 +0000 (+0300) Subject: Fix missing new-line and redundant trailing dot in WARN messages X-Git-Tag: v7.4.6~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03217630a0202c6dbc71997c190f31013c07c9b8;p=gc Fix missing new-line and redundant trailing dot in WARN messages * 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. --- diff --git a/allchblk.c b/allchblk.c index 98085b6d..9293d289 100644 --- a/allchblk.c +++ b/allchblk.c @@ -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 c6b47669..6a7f1afa 100644 --- a/alloc.c +++ b/alloc.c @@ -1304,7 +1304,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) diff --git a/dyn_load.c b/dyn_load.c index 326bd2de..b3ecde86 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -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); } } diff --git a/os_dep.c b/os_dep.c index 886e789c..00dcf004 100644 --- a/os_dep.c +++ b/os_dep.c @@ -2035,7 +2035,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; } @@ -3640,7 +3640,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); @@ -3720,7 +3720,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. */ @@ -4086,7 +4086,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 */ @@ -4117,7 +4117,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) { diff --git a/win32_threads.c b/win32_threads.c index f29101ef..56658aac 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1772,7 +1772,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; }