From 3e2ba7a6510be583edb316372f8cfff35f2f25d5 Mon Sep 17 00:00:00 2001 From: Kevin Svetlitski Date: Wed, 26 Apr 2023 14:10:41 -0700 Subject: Remove dead stores detected by static analysis None of these are harmful, and they are almost certainly optimized away by the compiler. The motivation for fixing them anyway is that we'd like to enable static analysis as part of CI, and the first step towards that is resolving the warnings it produces at present. --- include/jemalloc/internal/log.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/jemalloc') diff --git a/include/jemalloc/internal/log.h b/include/jemalloc/internal/log.h index 64208586..f39c598a 100644 --- a/include/jemalloc/internal/log.h +++ b/include/jemalloc/internal/log.h @@ -96,8 +96,7 @@ log_impl_varargs(const char *name, ...) { dst_offset += malloc_snprintf(buf, JEMALLOC_LOG_BUFSIZE, "%s: ", name); dst_offset += malloc_vsnprintf(buf + dst_offset, JEMALLOC_LOG_BUFSIZE - dst_offset, format, ap); - dst_offset += malloc_snprintf(buf + dst_offset, - JEMALLOC_LOG_BUFSIZE - dst_offset, "\n"); + malloc_snprintf(buf + dst_offset, JEMALLOC_LOG_BUFSIZE - dst_offset, "\n"); va_end(ap); malloc_write(buf); -- cgit v1.2.1