From 7848dd70193c5926f9d414b816d6a94a6591e0c9 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 28 May 2024 10:44:10 +0200 Subject: [PATCH] test_rtt: Fix compiler errors Signed-off-by: Steffen Vogel --- include/villas/nodes/test_rtt.hpp | 10 +++++----- lib/nodes/test_rtt.cpp | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/villas/nodes/test_rtt.hpp b/include/villas/nodes/test_rtt.hpp index 75e79bc99..c33db2d8c 100644 --- a/include/villas/nodes/test_rtt.hpp +++ b/include/villas/nodes/test_rtt.hpp @@ -77,6 +77,11 @@ protected: bool shutdown; + virtual int _read(struct Sample *smps[], unsigned cnt); + + virtual int _write(struct Sample *smps[], unsigned cnt); + +public: enum Mode { UNKNOWN, MIN, @@ -87,11 +92,6 @@ protected: AT_LEAST_DURATION }; - virtual int _read(struct Sample *smps[], unsigned cnt); - - virtual int _write(struct Sample *smps[], unsigned cnt); - -public: TestRTT(const uuid_t &id = {}, const std::string &name = "") : Node(id, name), task(CLOCK_MONOTONIC), formatter(nullptr), stream(nullptr), shutdown(false) {} diff --git a/lib/nodes/test_rtt.cpp b/lib/nodes/test_rtt.cpp index 010234c31..9a82c9526 100644 --- a/lib/nodes/test_rtt.cpp +++ b/lib/nodes/test_rtt.cpp @@ -128,7 +128,7 @@ static enum TestRTT::Mode parseMode(const char *mode_str) { else if (strcmp(mode_str, "at_least_duration")) return TestRTT::Mode::AT_LEAST_DURATION; else - return TestRTT : Mode::UNKNOWN; + return TestRTT::Mode::UNKNOWN; } int TestRTT::parse(json_t *json) { @@ -303,6 +303,8 @@ int TestRTT::parse(json_t *json) { if (count_effective < count_duration) count_effective = count_duration; break; + + default: {} } auto filename = fmt::format("{}/{}_values{}_rate{}.log", output, prefix,