Refine warning pragmas, and make it possible to revert to all warnings (e.g. in order to fix them!)

This commit is contained in:
Chris Cannam
2024-01-05 15:37:44 +00:00
parent 9ea386261b
commit 9027f86022

View File

@@ -45,15 +45,18 @@
# define R__
#endif
#ifdef _MSC_VER
#ifndef RUBBERBAND_ENABLE_WARNINGS
#if defined(_MSC_VER)
#pragma warning(disable:4127; disable:4244; disable:4267)
#else
#elif defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wconversion"
#elif defined(__clang__)
#pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wfloat-conversion"
#pragma clang diagnostic ignored "-Wimplicit-float-conversion"
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
#endif
#endif
#ifdef __clang__
# define RTENTRY__ __attribute__((annotate("realtime")))