Skip to content

Commit

Permalink
Fix cppcheck HIGH error (#5250)
Browse files Browse the repository at this point in the history
#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.
  • Loading branch information
fifieldt authored Nov 4, 2024
1 parent 2760670 commit e71be77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1195,4 +1196,4 @@ void loop()
mainDelay.delay(delayMsec);
}
}
#endif
#endif

0 comments on commit e71be77

Please sign in to comment.