diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-20 17:07:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-20 17:07:35 +0200 |
commit | bde46fdeceec8f9dd675f0e31080d732308573d9 (patch) | |
tree | 0044b6fd7f2f1682941e053ea686ec98a1d4f898 /src/nvim/macros.h | |
parent | 3280765f2dde4ba6d120387908d735ed763db01c (diff) | |
parent | 7dc7d2f83f30eb2df1c5408ffceda244ced2f468 (diff) | |
download | rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.tar.gz rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.tar.bz2 rneovim-bde46fdeceec8f9dd675f0e31080d732308573d9.zip |
Merge #6772 from ZyX-I/fix-pvs-errors
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 |