Merge branch 'jk/squelch-false-warning-from-gcc-o3'

* jk/squelch-false-warning-from-gcc-o3:
  color_parse_mem: initialize "struct color" temporary
  error_errno: use constant return similar to error()
This commit is contained in:
Junio C Hamano
2016-09-12 15:34:33 -07:00
3 changed files with 3 additions and 1 deletions

View File

@ -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])) {