FS-11903: Fix errors reported by PVS-Studio Static Code Analyzer for switch_platform.h

This commit is contained in:
Andrey Volk 2019-07-12 22:34:44 +04:00
parent 44c38c5273
commit ae64513044
1 changed files with 4 additions and 0 deletions

View File

@ -337,8 +337,12 @@ SWITCH_END_EXTERN_C
#define TRUE (!FALSE)
#endif
#ifndef switch_assert
#ifdef PVS_STUDIO // Mute PVS FALSE ALARM
#define switch_assert(expr) do {if (!(expr)) {fprintf(stderr, "MEMERR\n"); abort();}} while (0)
#else
#define switch_assert(expr) assert(expr)
#endif
#endif
#ifndef __ATTR_SAL
/* used for msvc code analysis */
/* http://msdn2.microsoft.com/en-us/library/ms235402.aspx */