mark SkMD5->SkUUID copy as sane
GCC gets worried when we do things like memcpy() into non-trivial types
like SkUUID, but this one is pretty clearly fine. (SkUUID is
non-trivial because of the implicit constructor that zeros it.) We can
stifle the warning by casting the destination pointer to void*.
Change-Id: I6637964359f5d923fa97c4af2c608e61fdd1f457
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258448
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp
index 21c3ed9..ca0a825 100644
--- a/src/pdf/SkPDFMetadata.cpp
+++ b/src/pdf/SkPDFMetadata.cpp
@@ -162,7 +162,7 @@
digest.data[8] = (digest.data[6] & 0x3F) | 0x80;
static_assert(sizeof(digest) == sizeof(SkUUID), "uuid_size");
SkUUID uuid;
- memcpy(&uuid, &digest, sizeof(digest));
+ memcpy((void*)&uuid, &digest, sizeof(digest));
return uuid;
}