diff --git a/ntcore/src/main/native/include/networktables/NetworkTableInstance.inc b/ntcore/src/main/native/include/networktables/NetworkTableInstance.inc index fdd517e2010..b4bbee16c00 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTableInstance.inc +++ b/ntcore/src/main/native/include/networktables/NetworkTableInstance.inc @@ -257,6 +257,12 @@ inline void NetworkTableInstance::AddSchema(std::string_view name, ::nt::AddSchema(m_handle, name, type, schema); } +// Suppress unused-lambda-capture warning on AddSchema() call +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-lambda-capture" +#endif + template void NetworkTableInstance::AddProtobufSchema(wpi::ProtobufMessage& msg) { msg.ForEachProtobufDescriptor( @@ -273,4 +279,8 @@ void NetworkTableInstance::AddStructSchema() { }); } +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + } // namespace nt