aboutsummaryrefslogtreecommitdiff
path: root/init-db.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-08 09:59:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-08 09:59:28 -0700
commit19b2860cba5742ab31fd682b80fefefac19be141 (patch)
tree406548bda4dfb72566db6e515e38604a7641ec15 /init-db.c
parentbf0c6e839c692142784caf07b523cd69442e57a5 (diff)
downloadgit-19b2860cba5742ab31fd682b80fefefac19be141.tar.gz
git-19b2860cba5742ab31fd682b80fefefac19be141.tar.xz
Use "-Wall -O2" for the compiler to get more warnings.
And fix up the warnings that it pointed out. Let's keep the tree clean from early on. Not that the code is very beautiful anyway ;)
Diffstat (limited to 'init-db.c')
-rw-r--r--init-db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/init-db.c b/init-db.c
index bc6508636..1fcef0b37 100644
--- a/init-db.c
+++ b/init-db.c
@@ -8,7 +8,7 @@
int main(int argc, char **argv)
{
char *sha1_dir = getenv(DB_ENVIRONMENT), *path;
- int len, i, fd;
+ int len, i;
if (mkdir(".dircache", 0700) < 0) {
perror("unable to create .dircache");
@@ -25,7 +25,7 @@ int main(int argc, char **argv)
if (sha1_dir) {
struct stat st;
if (!stat(sha1_dir, &st) < 0 && S_ISDIR(st.st_mode))
- return;
+ return 0;
fprintf(stderr, "DB_ENVIRONMENT set to bad directory %s: ", sha1_dir);
}