summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorLee Bousfield <ljbousfield@gmail.com>2025-03-17 09:52:40 -0500
committerGitHub <noreply@github.com>2025-03-17 15:52:40 +0100
commit011d7ccb91081ff99f184564ea38d1b9e543a99c (patch)
tree39db18bd22a0f3936b09a540e05220eed6cfea18 /src/plugins
parentefc51eb7d1ec8377425bb7b623b54831f2c18afc (diff)
internal: Fix compiler warnings (#9646)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/PluginAPI.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index c8c9e563..fbacbaab 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -59,6 +59,12 @@ struct SVersionInfo {
#define OPTIONAL
#define HANDLE void*
+// C ABI is needed to prevent symbol mangling, but we don't actually need C compatibility,
+// so we ignore this warning about return types that are potentially incompatible with C.
+// Clang supports this pragma too.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
+
class IHyprLayout;
class CWindow;
class IHyprWindowDecoration;
@@ -70,7 +76,7 @@ class CWindow;
Methods marked with REQUIRED are required.
*/
-/*
+/*
called pre-plugin init.
In case of a version mismatch, will eject the .so.
@@ -315,3 +321,5 @@ APICALL inline EXPORT const char* __hyprland_api_get_client_hash() {
return GIT_COMMIT_HASH;
}
// NOLINTEND
+
+#pragma GCC diagnostic pop