Browse Source

test: warning fixes

pull/2575/head
Maxim Prokhorov 1 year ago
parent
commit
fb21386de5
3 changed files with 19 additions and 5 deletions
  1. +3
    -4
      code/espurna/ifan.cpp
  2. +1
    -1
      code/espurna/relay.cpp
  3. +15
    -0
      code/scripts/test_build.py

+ 3
- 4
code/espurna/ifan.cpp View File

@ -138,13 +138,12 @@ struct StatePins {
private:
// XXX: while these are hard-coded, we don't really benefit from having these in the hardware cfg
bool _initialized { false };
Pins _pins{
Pins _pins{{
Pin{5, nullptr},
Pin{4, nullptr},
Pin{15, nullptr}
};
Pin{15, nullptr}}};
State _state {LOW, LOW, LOW};
State _state{{LOW, LOW, LOW}};
};
StatePins::State StatePins::state(FanSpeed speed) {


+ 1
- 1
code/espurna/relay.cpp View File

@ -511,7 +511,7 @@ void trigger(Duration duration, size_t id, bool target) {
return;
}
bool rescheduled { false };
bool rescheduled [[gnu::unused]] { false };
auto it = find(id);
if (it != internal::timers.end()) {
(*it).update(duration, target);


+ 15
- 0
code/scripts/test_build.py View File

@ -112,6 +112,12 @@ def main(args):
configurations = []
if not args.no_default:
configurations = list(pathlib.Path(".").glob(args.default_configurations))
if args.start_from:
try:
offset = configurations.index(pathlib.Path(args.start_from))
configurations = configurations[offset:]
except ValueError:
pass
if args.add:
configurations.extend(args.add)
@ -149,17 +155,26 @@ if __name__ == "__main__":
)
parser.add_argument("-e", "--environment", help="PIO environment")
parser.add_argument(
"--default-configurations",
default="test/build/*.h",
help="(glob) default configuration headers",
)
parser.add_argument(
"--start-from",
help="When using default configuration, skip everything until this name",
)
parser.add_argument(
"--no-silent", action="store_true", help="Do not silence pio-run"
)
parser.add_argument(
"--no-single-source", action="store_true", help="Disable 'unity' build"
)
parser.add_argument(
"--no-build",
action="store_true",


Loading…
Cancel
Save