From: Junio C Hamano Date: Mon, 30 Oct 2006 23:29:53 +0000 (-0800) Subject: Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif" X-Git-Tag: v1.4.3.4~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4903161fb8c74bc583b21d7ffe7abaf223df4253;p=git.git Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif" Otherwise "make CFLAGS=-DDEBUG=1" is cumbersome to run. Signed-off-by: Junio C Hamano --- diff --git a/blame.c b/blame.c index 8cfd5d94c..3e227d271 100644 --- a/blame.c +++ b/blame.c @@ -18,7 +18,9 @@ #include "revision.h" #include "xdiff-interface.h" +#ifndef DEBUG #define DEBUG 0 +#endif static const char blame_usage[] = "git-blame [-c] [-l] [-t] [-S ] [--] file [commit]\n" " -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) util2->num_lines ? util->num_lines : util2->num_lines; int num; + if (print_map == NULL) + ; /* to avoid "unused function" warning */ + for (i = 0; i < max; i++) { printf("i: %d ", i); num = -1; diff --git a/cache-tree.c b/cache-tree.c index d388848dd..a80326289 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -2,7 +2,9 @@ #include "tree.h" #include "cache-tree.h" +#ifndef DEBUG #define DEBUG 0 +#endif struct cache_tree *cache_tree(void) {