diff --git a/lib/src/array.h b/lib/src/array.h index 43358fcc..45969242 100644 --- a/lib/src/array.h +++ b/lib/src/array.h @@ -13,6 +13,16 @@ extern "C" { #include #include +#ifdef _MSC_VER +#pragma warning(disable : 4101) +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-variable" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + #define Array(T) \ struct { \ T *contents; \ @@ -265,6 +275,14 @@ static inline void _array__splice(Array *self, size_t element_size, /// parameter by reference in order to work with the generic sorting function above. #define compare_int(a, b) ((int)*(a) - (int)(b)) +#ifdef _MSC_VER +#pragma warning(default : 4101) +#elif defined(__clang__) +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #ifdef __cplusplus } #endif