Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif"
Otherwise "make CFLAGS=-DDEBUG=1" is cumbersome to run. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Oct 30, 2006 at 15:29 UTC
4903161fb8c74bc583b21d7ffe7abaf223df4253
2 files changed
+7
blame.c
+5
@@ -18,7 +18,9 @@
18
#include "revision.h"
19
#include "xdiff-interface.h"
20
21
+#ifndef DEBUG
22
#define DEBUG 0
23
+#endif
24
25
static const char blame_usage[] = "git-blame [-c] [-l] [-t] [-S <revs-file>] [--] file [commit]\n"
26
" -c, --compatibility Use the same output mode as git-annotate (Default: off)\n"
@@ -232,6 +234,9 @@ static void print_map(struct commit *cmit, struct commit *other)
234
util2->num_lines ? util->num_lines : util2->num_lines;
235
int num;
236
237
+ if (print_map == NULL)
238
+ ; /* to avoid "unused function" warning */
239
+
240
for (i = 0; i < max; i++) {
241
printf("i: %d ", i);
242
num = -1;
cache-tree.c
+2
@@ -2,7 +2,9 @@
2
#include "tree.h"
3
#include "cache-tree.h"
4
5
+#ifndef DEBUG
6
#define DEBUG 0
7
+#endif
8
9
struct cache_tree *cache_tree(void)
10
{