From 0b020f88f286c98fededd7f85add4274c21d8ec9 Mon Sep 17 00:00:00 2001 From: stuxnot <41650734+stuxnot@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:23:58 +0100 Subject: [PATCH] Do not emit UnusedParameter warnings for LLVM code --- include/nyxstone.h | 3 +++ src/ELFStreamerWrapper.cpp | 3 +++ src/ELFStreamerWrapper.h | 3 +++ src/ObjectWriterWrapper.h | 3 +++ src/nyxstone.cpp | 3 +++ 5 files changed, 15 insertions(+) diff --git a/include/nyxstone.h b/include/nyxstone.h index 5317c82..86b05e5 100644 --- a/include/nyxstone.h +++ b/include/nyxstone.h @@ -2,12 +2,15 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include #include #include #include #include +#pragma GCC diagnostic pop namespace nyxstone { diff --git a/src/ELFStreamerWrapper.cpp b/src/ELFStreamerWrapper.cpp index ced5c53..64a3b90 100644 --- a/src/ELFStreamerWrapper.cpp +++ b/src/ELFStreamerWrapper.cpp @@ -4,6 +4,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include #include @@ -18,6 +20,7 @@ #include #include #include +#pragma GCC diagnostic pop #include #include diff --git a/src/ELFStreamerWrapper.h b/src/ELFStreamerWrapper.h index aa9e168..d3c65cb 100644 --- a/src/ELFStreamerWrapper.h +++ b/src/ELFStreamerWrapper.h @@ -2,10 +2,13 @@ #include "nyxstone.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include #include #include +#pragma GCC diagnostic pop namespace nyxstone { /// This class derives from LLVM's MCELFStreamer, which enables us to receive diff --git a/src/ObjectWriterWrapper.h b/src/ObjectWriterWrapper.h index 40c8b75..369b711 100644 --- a/src/ObjectWriterWrapper.h +++ b/src/ObjectWriterWrapper.h @@ -4,6 +4,8 @@ #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include #include @@ -16,6 +18,7 @@ #include #include #include +#pragma GCC diagnostic pop namespace nyxstone { /// This class enables us to limit the final output byte stream to the diff --git a/src/nyxstone.cpp b/src/nyxstone.cpp index 37d87ef..733a5d9 100644 --- a/src/nyxstone.cpp +++ b/src/nyxstone.cpp @@ -3,6 +3,8 @@ #include "ELFStreamerWrapper.h" #include "ObjectWriterWrapper.h" +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" #include #include #include @@ -14,6 +16,7 @@ #include #include #include +#pragma GCC diagnostic pop #include #include