summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-09-19 13:51:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-19 13:51:41 -0700
commit3d54b93f405c6881ac477c5bfec10802ea53f73d (patch)
treec75a7d1af7dc617539d05c7eae34df0ef36d8a94 /color.c
parentMerge branch 'ep/use-git-trace-curl-in-tests' into maint (diff)
parentcolor_parse_mem: initialize "struct color" temporary (diff)
downloadtgif-3d54b93f405c6881ac477c5bfec10802ea53f73d.tar.xz
Merge branch 'jk/squelch-false-warning-from-gcc-o3' into maint
Compilation fix. * jk/squelch-false-warning-from-gcc-o3: color_parse_mem: initialize "struct color" temporary error_errno: use constant return similar to error()
Diffstat (limited to 'color.c')
-rw-r--r--color.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/color.c b/color.c
index 81c2676723..1b95e6b2a7 100644
--- a/color.c
+++ b/color.c
@@ -215,7 +215,7 @@ int color_parse_mem(const char *value, int value_len, char *dst)
/* [fg [bg]] [attr]... */
while (len > 0) {
const char *word = ptr;
- struct color c;
+ struct color c = { COLOR_UNSPECIFIED };
int val, wordlen = 0;
while (len > 0 && !isspace(word[wordlen])) {