diff --git a/include/aaru.h b/include/aaru.h
index daec4f5..21297e0 100644
--- a/include/aaru.h
+++ b/include/aaru.h
@@ -16,8 +16,11 @@
* License along with this library; if not, see .
*/
+#ifndef _MSC_VER
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
+#endif
+
#ifndef LIBAARUFORMAT_AARU_H
#define LIBAARUFORMAT_AARU_H
@@ -1166,4 +1169,6 @@ typedef enum
#endif // LIBAARUFORMAT_AARU_H
-#pragma clang diagnostic pop
\ No newline at end of file
+#ifndef _MSC_VER
+#pragma clang diagnostic pop
+#endif
\ No newline at end of file
diff --git a/include/aaruformat/consts.h b/include/aaruformat/consts.h
index 3dacfca..b73513e 100644
--- a/include/aaruformat/consts.h
+++ b/include/aaruformat/consts.h
@@ -16,8 +16,11 @@
* License along with this library; if not, see .
*/
+#ifndef _MSC_VER
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedMacroInspection"
+#endif
+
#ifndef LIBAARUFORMAT_CONSTS_H
#define LIBAARUFORMAT_CONSTS_H
@@ -50,4 +53,6 @@
#endif // LIBAARUFORMAT_CONSTS_H
-#pragma clang diagnostic pop
\ No newline at end of file
+#ifndef _MSC_VER
+#pragma clang diagnostic pop
+#endif
\ No newline at end of file
diff --git a/include/aaruformat/enums.h b/include/aaruformat/enums.h
index cb1af45..3b198cb 100644
--- a/include/aaruformat/enums.h
+++ b/include/aaruformat/enums.h
@@ -16,8 +16,11 @@
* License along with this library; if not, see .
*/
+#ifndef _MSC_VER
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
+#endif
+
#ifndef LIBAARUFORMAT_ENUMS_H
#define LIBAARUFORMAT_ENUMS_H
@@ -285,4 +288,6 @@ typedef enum
#endif // LIBAARUFORMAT_ENUMS_H
-#pragma clang diagnostic pop
\ No newline at end of file
+#ifndef _MSC_VER
+#pragma clang diagnostic pop
+#endif
\ No newline at end of file
diff --git a/include/aaruformat/structs.h b/include/aaruformat/structs.h
index 4006680..4d00d41 100644
--- a/include/aaruformat/structs.h
+++ b/include/aaruformat/structs.h
@@ -16,8 +16,11 @@
* License along with this library; if not, see .
*/
+#ifndef _MSC_VER
#pragma clang diagnostic push
#pragma ide diagnostic ignored "OCUnusedGlobalDeclarationInspection"
+#endif
+
#ifndef LIBAARUFORMAT_STRUCTS_H
#define LIBAARUFORMAT_STRUCTS_H
@@ -309,4 +312,6 @@ typedef struct CdEccContext
#endif // LIBAARUFORMAT_STRUCTS_H
-#pragma clang diagnostic pop
\ No newline at end of file
+#ifndef _MSC_VER
+#pragma clang diagnostic pop
+#endif
\ No newline at end of file