mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Hide some warnings on newer GCC versions, GitHUb issue 2525.
This commit is contained in:
@ -157,8 +157,7 @@ options_value_to_string(struct options_entry *o, union options_value *ov,
|
||||
case OPTIONS_TABLE_CHOICE:
|
||||
s = xstrdup(o->tableentry->choices[ov->number]);
|
||||
break;
|
||||
case OPTIONS_TABLE_STRING:
|
||||
case OPTIONS_TABLE_COMMAND:
|
||||
default:
|
||||
fatalx("not a number option type");
|
||||
}
|
||||
return (s);
|
||||
@ -311,6 +310,8 @@ options_default_to_string(const struct options_table_entry *oe)
|
||||
case OPTIONS_TABLE_CHOICE:
|
||||
s = xstrdup(oe->choices[oe->default_num]);
|
||||
break;
|
||||
default:
|
||||
fatalx("unknown option type");
|
||||
}
|
||||
return (s);
|
||||
}
|
||||
@ -703,7 +704,7 @@ options_get_number(struct options *oo, const char *name)
|
||||
if (o == NULL)
|
||||
fatalx("missing option %s", name);
|
||||
if (!OPTIONS_IS_NUMBER(o))
|
||||
fatalx("option %s is not a number", name);
|
||||
fatalx("option %s is not a number", name);
|
||||
return (o->value.number);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user