mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fix warnings from GCC 13 release build (#5637)
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
|
||||
namespace nt::net {
|
||||
|
||||
#if __GNUC__ >= 13
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
struct PublishMsg {
|
||||
static constexpr std::string_view kMethodStr = "publish";
|
||||
NT_Publisher pubHandle{0};
|
||||
@@ -57,6 +62,10 @@ struct ClientValueMsg {
|
||||
Value value;
|
||||
};
|
||||
|
||||
#if __GNUC__ >= 13
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
struct ClientMessage {
|
||||
using Contents =
|
||||
std::variant<std::monostate, PublishMsg, UnpublishMsg, SetPropertiesMsg,
|
||||
|
||||
@@ -629,7 +629,7 @@ class Value final {
|
||||
friend bool operator==(const Value& lhs, const Value& rhs);
|
||||
|
||||
private:
|
||||
NT_Value m_val;
|
||||
NT_Value m_val = {};
|
||||
std::shared_ptr<void> m_storage;
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ TEST_P(AllianceTest, Alliance) {
|
||||
|
||||
frc::sim::StepTiming(20_ms);
|
||||
|
||||
bool isRed;
|
||||
bool isRed = false;
|
||||
switch (alliance) {
|
||||
case HAL_AllianceStationID_kBlue1:
|
||||
case HAL_AllianceStationID_kBlue2:
|
||||
|
||||
@@ -61,7 +61,7 @@ TEST_P(AllianceTest, Alliance) {
|
||||
|
||||
frc::sim::StepTiming(20_ms);
|
||||
|
||||
char expected;
|
||||
char expected = 'U';
|
||||
switch (alliance) {
|
||||
case HAL_AllianceStationID_kBlue1:
|
||||
case HAL_AllianceStationID_kBlue2:
|
||||
|
||||
Reference in New Issue
Block a user