mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tyler Veness <calcmogul@gmail.com>
|
|
Date: Mon, 24 Feb 2025 15:12:03 -0800
|
|
Subject: [PATCH 08/10] Suppress GCC 12 warning false positive
|
|
|
|
---
|
|
include/sleipnir/autodiff/variable_matrix.hpp | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/include/sleipnir/autodiff/variable_matrix.hpp b/include/sleipnir/autodiff/variable_matrix.hpp
|
|
index 2bdbf11841b9920111b9cb1426d6fd04764040e4..8b84a04780240cffb801e2c6f84e22c0e5246286 100644
|
|
--- a/include/sleipnir/autodiff/variable_matrix.hpp
|
|
+++ b/include/sleipnir/autodiff/variable_matrix.hpp
|
|
@@ -503,6 +503,10 @@ class VariableMatrix : public SleipnirBase {
|
|
|
|
VariableMatrix<Scalar> result(detail::empty, lhs.rows(), rhs.cols());
|
|
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic push
|
|
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
|
+#endif
|
|
for (int i = 0; i < lhs.rows(); ++i) {
|
|
for (int j = 0; j < rhs.cols(); ++j) {
|
|
Variable sum{Scalar(0)};
|
|
@@ -558,6 +562,9 @@ class VariableMatrix : public SleipnirBase {
|
|
result[i, j] = sum;
|
|
}
|
|
}
|
|
+#if __GNUC__ >= 12
|
|
+#pragma GCC diagnostic pop
|
|
+#endif
|
|
|
|
return result;
|
|
}
|