diff options
Diffstat (limited to 'tools/perf/util/wrapper.c')
-rw-r--r-- | tools/perf/util/wrapper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/wrapper.c b/tools/perf/util/wrapper.c index 6350d65f6d9e..4574ac28396f 100644 --- a/tools/perf/util/wrapper.c +++ b/tools/perf/util/wrapper.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * There's no pack memory to release - but stay close to the Git | 7 | * There's no pack memory to release - but stay close to the Git |
8 | * version so wrap this away: | 8 | * version so wrap this away: |
9 | */ | 9 | */ |
10 | static inline void release_pack_memory(size_t size, int flag) | 10 | static inline void release_pack_memory(size_t size __used, int flag __used) |
11 | { | 11 | { |
12 | } | 12 | } |
13 | 13 | ||
@@ -59,7 +59,8 @@ void *xmemdupz(const void *data, size_t len) | |||
59 | char *xstrndup(const char *str, size_t len) | 59 | char *xstrndup(const char *str, size_t len) |
60 | { | 60 | { |
61 | char *p = memchr(str, '\0', len); | 61 | char *p = memchr(str, '\0', len); |
62 | return xmemdupz(str, p ? p - str : len); | 62 | |
63 | return xmemdupz(str, p ? (size_t)(p - str) : len); | ||
63 | } | 64 | } |
64 | 65 | ||
65 | void *xrealloc(void *ptr, size_t size) | 66 | void *xrealloc(void *ptr, size_t size) |