+#include <valarray>
#include <vector>
#include "src/conf/warn.h"
// UCF stands for 'undefined control flow'
struct ucf_t
{
- std::vector<uint8_t> loops;
+ std::valarray<bool> loops;
std::vector<path_t> paths;
path_t prefix;
ucf_size_t size;
size_t i)
{
const Node &node = skel.nodes[i];
- uint8_t &loop = ucf.loops[i];
+ bool &loop = ucf.loops[i];
path_t &prefix = ucf.prefix;
ucf_size_t &size = ucf.size;
} else if (node.end()) {
ucf.paths.push_back(prefix);
size = size + ucf_size_t::from64(prefix.len());
- } else if (loop < 2) {
- local_inc _(loop);
+ } else if (!loop) {
+ loop = true;
Node::arcsets_t::const_iterator
arc = node.arcsets.begin(),
end = node.arcsets.end();
re2c: warning: line 5: control flow is undefined for strings that match
'[\x0-\x60\x62-\xFF]'
'\x61 [\x0-\x60\x63-\xFF]'
- '\x61 \x61 [\x0-\x60\x63-\xFF]'
'\x61 \x62 [\x0-\x61\x63-\xFF]'
- '\x61 \x61 \x62 [\x0-\x61\x63-\xFF]'
, use default rule '*' [-Wundefined-control-flow]
re2c: warning: line 5: control flow is undefined for strings that match
'[\x0-\x60\x62-\xFF]'
'\x61 [\x0-\x60\x63-\xFF]'
- '\x61 \x61 [\x0-\x60\x63-\xFF]'
'\x61 \x62 [\x0-\x61\x63-\xFF]'
- '\x61 \x61 \x62 [\x0-\x61\x63-\xFF]'
, use default rule '*' [-Wundefined-control-flow]
re2c: warning: line 5: control flow is undefined for strings that match
'[\x0-\x60\x62-\xFF]'
'\x61 [\x0-\x60\x63-\xFF]'
- '\x61 \x61 [\x0-\x60\x63-\xFF]'
'\x61 \x62 [\x0-\x61\x63-\xFF]'
- '\x61 \x61 \x62 [\x0-\x61\x63-\xFF]'
, use default rule '*' [-Wundefined-control-flow]