Fix Windows skia build
C:\lo\build\workdir\UnpackedTarball\skia\include/private/base/SkTemplates.h(125): warning C5030: attribute [[clang::reinitializes]] is not recognized Change-Id: I32649a4b6e7430fd9f74bfdcc0622c790568f0b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192802 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
+1
@@ -42,6 +42,7 @@ skia_patches := \
|
||||
0002-loong64-Honor-existing-LASX-LSX-settings.patch \
|
||||
0003-loong64-Fix-missing-rounding-in-loong64-scaled_mult-.patch \
|
||||
0004-loong64-Fix-the-remaining-implicit-vector-casts.patch \
|
||||
msvc-unknown-attributes.patch.1 \
|
||||
|
||||
ifneq ($(MSYSTEM),)
|
||||
# use binary flag so patch from git-bash won't choke on mixed line-endings in patches
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
--- skia/include/private/base/SkTemplates.h
|
||||
+++ skia/include/private/base/SkTemplates.h
|
||||
@@ -122,7 +122,9 @@
|
||||
}
|
||||
|
||||
// Reallocates given a new count. Reallocation occurs even if new count equals old count.
|
||||
+#ifndef _MSC_VER
|
||||
[[clang::reinitializes]]
|
||||
+#endif
|
||||
void reset(size_t count = 0) {
|
||||
*this = AutoTArray(count);
|
||||
}
|
||||
@@ -210,7 +212,9 @@
|
||||
}
|
||||
|
||||
/** Destroys previous objects in the array and default constructs count number of objects */
|
||||
+#ifndef _MSC_VER
|
||||
[[clang::reinitializes]]
|
||||
+#endif
|
||||
void reset(int count) {
|
||||
T* start = begin();
|
||||
T* iter = end();
|
||||
@@ -331,7 +335,9 @@
|
||||
}
|
||||
|
||||
/** Resize the memory area pointed to by the current ptr without preserving contents. */
|
||||
+#ifndef _MSC_VER
|
||||
[[clang::reinitializes]]
|
||||
+#endif
|
||||
T* reset(size_t count = 0) {
|
||||
fPtr.reset(count ? (T*)sk_malloc_throw(count, sizeof(T)) : nullptr);
|
||||
return this->get();
|
||||
@@ -402,7 +408,9 @@
|
||||
}
|
||||
|
||||
// doesn't preserve contents
|
||||
+#ifndef _MSC_VER
|
||||
[[clang::reinitializes]]
|
||||
+#endif
|
||||
T* reset(size_t count) {
|
||||
if (fPtr != fTStorage) {
|
||||
sk_free(fPtr);
|
||||
Reference in New Issue
Block a user