update c23 warning

David Rebbe 2024-12-03 15:38:34 -05:00
parent 983552657b
commit 29486df894
2 changed files with 6 additions and 2 deletions

View File

@ -24,11 +24,15 @@ extern "C" {
#pragma warning Unknown dynamic link import/export semantics.
#endif
#ifdef ICSNEO_BUILD_STATIC
#define ICSNEO_API
#else
#ifdef ICSNEO_EXPORTS
#define ICSNEO_API EXPORT
#else
#define ICSNEO_API IMPORT
#endif
#endif // ICSNEO_EXPORTS
#endif // ICSNEO_BUILD_STATIC
/** @brief icsneo_device_t opaque struct definition
*

View File

@ -160,7 +160,7 @@ typedef uint32_t icsneo_devicetype_t;
// Make sure icsneo_devicetype_t is never smaller than the actual enum
#if __STDC_VERSION__ < 202311L && !defined(__cplusplus)
_Static_assert(sizeof(_icsneo_devicetype_t) <= sizeof(icsneo_devicetype_t));
_Static_assert(sizeof(_icsneo_devicetype_t) <= sizeof(icsneo_devicetype_t), "icsneo_devicetype_t is too small");
#else // C++ or C23
static_assert(sizeof(_icsneo_devicetype_t) <= sizeof(icsneo_devicetype_t));
#endif