Files
allwpilib/upstream_utils/implot_patches/0001-Supress-compiler-warnings.patch
Peter Johnson 476b9641c1 [upstream_utils] Update imgui and implot (#8762)
Not updating GLFW yet due to a likely future move to SDL.
2026-04-12 12:19:32 -07:00

51 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Johnson <johnson.peter@gmail.com>
Date: Sat, 11 Apr 2026 22:54:19 -0700
Subject: [PATCH] Supress compiler warnings
---
implot_internal.h | 9 +++++++++
implot_items.cpp | 4 ++++
2 files changed, 13 insertions(+)
diff --git a/implot_internal.h b/implot_internal.h
index 9f6dfb23ff38c354928dc5be51e1884d6df4c9c7..5ce48ed8338bba24ad87af6870a23cdd1aa75a9b 100644
--- a/implot_internal.h
+++ b/implot_internal.h
@@ -37,6 +37,11 @@
#endif
#ifndef IMGUI_DISABLE
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+
#include <time.h>
#include "imgui_internal.h"
@@ -1710,4 +1715,8 @@ IMPLOT_API void Locator_SymLog(ImPlotTicker& ticker, const ImPlotRange& range, f
} // namespace ImPlot
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
#endif // #ifndef IMGUI_DISABLE
diff --git a/implot_items.cpp b/implot_items.cpp
index adea97ef7604cf092b00793989a21c147ff999e2..717386dc394b904a08918113efc7949e5dfe9dac 100644
--- a/implot_items.cpp
+++ b/implot_items.cpp
@@ -30,6 +30,10 @@
#ifndef IMGUI_DISABLE
#include "implot_internal.h"
+#ifdef __GNUC__
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+
//-----------------------------------------------------------------------------
// [SECTION] Macros and Defines
//-----------------------------------------------------------------------------