You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor parse_number_range to avoid spurious uninitialized warning
g++-7 -O3 spuriously warned that begin_range was accessed without being
initialized:
```
../src/util/format_number_range.cpp:102:5: error: ‘*((void*)& begin_range +4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
for(unsigned i = *begin_range; i < *number; ++i)
^~~
../src/util/format_number_range.cpp:121:23: note: ‘*((void*)& begin_range +4)’ was declared here
optionalt<unsigned> begin_range;
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
```
Although optionalt may seem a bit more beautiful, it's perfectly
possible to implement parse_number_range without any use of optionalt.
0 commit comments