summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2014-01-29 07:04:02 (GMT)
committerJason Evans <jasone@canonware.com>2014-01-29 07:04:02 (GMT)
commit5f60afa01eb2cf7d44024d162a1ecc6cceedcca1 (patch)
tree0620d9c12a8c9d4852f27335aa4b1a29d3ec624e
parenta184d3fcdecfaaf694029fb375d023882aea444e (diff)
downloadjemalloc-5f60afa01eb2cf7d44024d162a1ecc6cceedcca1.zip
jemalloc-5f60afa01eb2cf7d44024d162a1ecc6cceedcca1.tar.gz
jemalloc-5f60afa01eb2cf7d44024d162a1ecc6cceedcca1.tar.bz2
Avoid a compiler warning.
Avoid copying "jeprof" to a 1-byte buffer within prof_boot0() when heap profiling is disabled. Although this is dead code under such conditions, the compiler doesn't figure that part out. Reported by Eduardo Silva.
-rw-r--r--include/jemalloc/internal/prof.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/jemalloc/internal/prof.h b/include/jemalloc/internal/prof.h
index db056fc..6f162d2 100644
--- a/include/jemalloc/internal/prof.h
+++ b/include/jemalloc/internal/prof.h
@@ -8,7 +8,11 @@ typedef struct prof_ctx_s prof_ctx_t;
typedef struct prof_tdata_s prof_tdata_t;
/* Option defaults. */
-#define PROF_PREFIX_DEFAULT "jeprof"
+#ifdef JEMALLOC_PROF
+# define PROF_PREFIX_DEFAULT "jeprof"
+#else
+# define PROF_PREFIX_DEFAULT ""
+#endif
#define LG_PROF_SAMPLE_DEFAULT 19
#define LG_PROF_INTERVAL_DEFAULT -1