vulkan: silence typed_memcpy -Waddress warnings
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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:
Mike Blumenkrantz 2025-07-28 11:35:38 -04:00 committed by Marge Bot
parent 0a536c7bf0
commit 05cc38bb68

View file

@ -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)