summaryrefslogtreecommitdiff
path: root/include/jemalloc
diff options
context:
space:
mode:
authorKevin Svetlitski <svetlitski@meta.com>2023-04-26 14:10:41 -0700
committerQi Wang <interwq@gmail.com>2023-05-11 20:27:49 -0700
commit3e2ba7a6510be583edb316372f8cfff35f2f25d5 (patch)
tree1b122673f81ec709d692e8999c85fd66054d79d5 /include/jemalloc
parent0288126d9cc0d061766e37cbbaabaa78aff3aff5 (diff)
downloadjemalloc-3e2ba7a6510be583edb316372f8cfff35f2f25d5.tar.gz
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.
Diffstat (limited to 'include/jemalloc')
-rw-r--r--include/jemalloc/internal/log.h3
1 files changed, 1 insertions, 2 deletions
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);