mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 01:20:22 +01:00
vulkan: silence typed_memcpy -Waddress warnings
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36413>
This commit is contained in:
parent
0a536c7bf0
commit
05cc38bb68
1 changed files with 4 additions and 2 deletions
|
|
@ -308,8 +308,10 @@ struct vk_pipeline_cache_header {
|
|||
|
||||
#define typed_memcpy(dest, src, count) do { \
|
||||
STATIC_ASSERT(sizeof(*(src)) == sizeof(*(dest))); \
|
||||
if ((dest) != NULL && (src) != NULL && (count) > 0) { \
|
||||
memcpy((dest), (src), (count) * sizeof(*(src))); \
|
||||
uint8_t *d = (uint8_t*)(dest); \
|
||||
const uint8_t *s = (const uint8_t*)(src); \
|
||||
if (d != NULL && s != NULL && (count) > 0) { \
|
||||
memcpy(d, s, (count) * sizeof(*(src))); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue