mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 12:08:19 +00:00
abstract: Assign default to value
Fix `-Wmaybe-uninitialized` on line 43 and 44.
This commit is contained in:
parent
f92ad7d900
commit
452dd1b74b
|
@ -45,7 +45,7 @@ struct Slice {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int parse_index(const char *begin, const char *end, const std::string &slice) {
|
static int parse_index(const char *begin, const char *end, const std::string &slice) {
|
||||||
int value;
|
int value = 0;
|
||||||
auto result = std::from_chars(begin, end, value, 10);
|
auto result = std::from_chars(begin, end, value, 10);
|
||||||
if (result.ptr != end || result.ptr == begin)
|
if (result.ptr != end || result.ptr == begin)
|
||||||
syntax_error(slice);
|
syntax_error(slice);
|
||||||
|
|
Loading…
Reference in a new issue