summaryrefslogtreecommitdiffstats
path: root/usage.c
diff options
context:
space:
mode:
Diffstat (limited to 'usage.c')
-rw-r--r--usage.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/usage.c b/usage.c
index 7a2f7805f5..47709006c1 100644
--- a/usage.c
+++ b/usage.c
@@ -3,6 +3,7 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
+
#include "git-compat-util.h"
#include "gettext.h"
#include "trace2.h"
@@ -189,7 +190,7 @@ void NORETURN die(const char *err, ...)
static const char *fmt_with_err(char *buf, int n, const char *fmt)
{
char str_error[256], *err;
- int i, j;
+ size_t i, j;
err = strerror(errno);
for (i = j = 0; err[i] && j < sizeof(str_error) - 1; ) {
@@ -350,18 +351,3 @@ void bug_fl(const char *file, int line, const char *fmt, ...)
trace2_cmd_error_va(fmt, ap);
va_end(ap);
}
-
-#ifdef SUPPRESS_ANNOTATED_LEAKS
-void unleak_memory(const void *ptr, size_t len)
-{
- static struct suppressed_leak_root {
- struct suppressed_leak_root *next;
- char data[FLEX_ARRAY];
- } *suppressed_leaks;
- struct suppressed_leak_root *root;
-
- FLEX_ALLOC_MEM(root, data, ptr, len);
- root->next = suppressed_leaks;
- suppressed_leaks = root;
-}
-#endif