From ea94b5991700722684b609b6a86deeca6a6d271b Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Mon, 4 Nov 2024 20:33:04 +0800 Subject: [PATCH] Fix cppcheck HIGH error https://github.com/meshtastic/firmware/pull/5247 introduced new protobufs, particularly the excluded_modules feature. Immediately afterward, cppcheck started sounding klaxons about an unitialized variable. This patch simply sets excluded_modules to none as a temporary measure while the feature from protobuf is integrated into code. --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index ff0d622c28..2efd674542 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1160,6 +1160,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() deviceMetadata.position_flags = config.position.position_flags; deviceMetadata.hw_model = HW_VENDOR; deviceMetadata.hasRemoteHardware = moduleConfig.remote_hardware.enabled; + deviceMetadata.excluded_modules = meshtastic_ExcludedModules_EXCLUDED_NONE; #if !(MESHTASTIC_EXCLUDE_PKI) deviceMetadata.hasPKC = true; #endif @@ -1195,4 +1196,4 @@ void loop() mainDelay.delay(delayMsec); } } -#endif +#endif \ No newline at end of file