diff options
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index 9ab6dc5d2b..26d4f74b6a 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -171,4 +171,16 @@ # define FALLTHROUGH #endif +// -V:STRUCT_CAST:641 + +/// Change type of structure pointers: cast `struct a *` to `struct b *` +/// +/// Used to silence PVS errors. +/// +/// @param Type Structure to cast to. +/// @param obj Object to cast. +/// +/// @return ((Type *)obj). +#define STRUCT_CAST(Type, obj) ((Type *)(obj)) + #endif // NVIM_MACROS_H |