Fix -Werror build: drop dead variables, honor nodiscard
Surfaced by a -DVOID_WARNINGS_AS_ERRORS=ON build now that Json/Ini are pulled into SHARED module TUs (Log, Fsm, Plugin, Configuration): - Json::Detail::parse_number: removed the unused is_float tracking var. - Ini::from_string: (void)-cast the nodiscard parse() result. - Fsm::Machine::dispatch_event: removed the dead `source` variable (the transition already carries its source state). Module targets now compile clean under -Wall -Wextra -Wpedantic -Werror; 967 tests green, ASan+UBSan clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c988f635e9
commit
ff6960a2af
3 files changed
+3
-6
No files matched your search
@@ -403,7 +403,6 @@ namespace Void::Fsm
|
||||
}
|
||||
|
||||
const MachineDef::TransitionDef* chosen = nullptr;
|
||||
StateId source = leaf;
|
||||
for (StateId cur = leaf; cur != kInvalidState && chosen == nullptr;
|
||||
cur = def.state(cur).parent) {
|
||||
for (const auto index : def.transitions_from(cur)) {
|
||||
@@ -415,7 +414,6 @@ namespace Void::Fsm
|
||||
continue;
|
||||
}
|
||||
chosen = &t;
|
||||
source = cur;
|
||||
break;
|
||||
}
|
||||
if (chosen == nullptr) {
|
||||
|
||||
Reference in new issue
Block a user