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:
commit
368332c471
2
color.c
2
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])) {
|
||||
|
@ -436,6 +436,7 @@ static inline int const_error(void)
|
||||
return -1;
|
||||
}
|
||||
#define error(...) (error(__VA_ARGS__), const_error())
|
||||
#define error_errno(...) (error_errno(__VA_ARGS__), const_error())
|
||||
#endif
|
||||
|
||||
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
|
||||
|
Loading…
Reference in New Issue
Block a user