aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-03-15 22:42:32 -0500
committerJunio C Hamano <gitster@pobox.com>2011-03-15 22:24:29 -0700
commit9ddf17268c632967abf2dadf9fa2b9d11dcc1867 (patch)
tree49fe8583570152b0e69b5f8ca43963589f69d82f /cache.h
parentf577b92fe75643228674c0dcb2a4747587cf541d (diff)
downloadgit-9ddf17268c632967abf2dadf9fa2b9d11dcc1867.tar.gz
git-9ddf17268c632967abf2dadf9fa2b9d11dcc1867.tar.xz
declare 1-bit bitfields to be unsigned
As "gcc -pedantic" notices, a two's complement 1-bit signed integer cannot represent the value '1'. dir.c: In function 'init_pathspec': dir.c:1291:4: warning: overflow in implicit constant conversion [-Woverflow] In the spirit of v1.7.1-rc1~10 (2010-04-06), 'unsigned' is what was intended, so let's make the flags unsigned. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 4beb2dc6f..edd5b5ad8 100644
--- a/cache.h
+++ b/cache.h
@@ -503,13 +503,13 @@ extern int ie_modified(const struct index_state *, struct cache_entry *, struct
struct pathspec {
const char **raw; /* get_pathspec() result, not freed by free_pathspec() */
int nr;
- int has_wildcard:1;
- int recursive:1;
+ unsigned int has_wildcard:1;
+ unsigned int recursive:1;
int max_depth;
struct pathspec_item {
const char *match;
int len;
- int has_wildcard:1;
+ unsigned int has_wildcard:1;
} *items;
};