Skip to content

Commit

Permalink
Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif"
Browse files Browse the repository at this point in the history
Otherwise "make CFLAGS=-DDEBUG=1" is cumbersome to run.

Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
Junio C Hamano committed Oct 30, 2006
1 parent d6b7e0b commit 4903161
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <revs-file>] [--] file [commit]\n"
" -c, --compatibility Use the same output mode as git-annotate (Default: off)\n"
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions cache-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#include "tree.h"
#include "cache-tree.h"

#ifndef DEBUG
#define DEBUG 0
#endif

struct cache_tree *cache_tree(void)
{
Expand Down

0 comments on commit 4903161

Please sign in to comment.