From 77d6960d24dcda21333b4fc62bcc3fb909d43b34 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 6 Aug 2025 20:31:14 +0000 Subject: [PATCH] Cleanup: quiet GCC warning for pointer subtraction Ref !144032 --- intern/cycles/util/md5.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/intern/cycles/util/md5.cpp b/intern/cycles/util/md5.cpp index 081fd437efe..8e527e4af3c 100644 --- a/intern/cycles/util/md5.cpp +++ b/intern/cycles/util/md5.cpp @@ -103,6 +103,10 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) static const int w = 1; if (*((const uint8_t *)&w)) /* dynamic little-endian */ { +#ifdef __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnull-pointer-subtraction" +#endif /* * On little-endian machines, we can process properly aligned * data without copying it. @@ -116,6 +120,9 @@ void MD5Hash::process(const uint8_t *data /*[64]*/) memcpy(xbuf, data, 64); X = xbuf; } +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif } else { /* dynamic big-endian */ /*