1e8ad06e51
The previous fixes in r458314 were not enough for i386. Backport fix from x11/kf5-kdelibs4support. PR: 224945
36 lines
1.9 KiB
Text
36 lines
1.9 KiB
Text
Backport of:
|
|
|
|
From 071cafe32212ced460c64ed56111387be975d1ae Mon Sep 17 00:00:00 2001
|
|
From: "Tobias C. Berner" <tcberner@gmail.com>
|
|
Date: Sun, 20 Nov 2016 12:16:30 +0100
|
|
Subject: [PATCH] Fix build on FreeBSD-i386.
|
|
|
|
/wrkdirs/usr/ports/x11/kf5-kdelibs4support/work/kdelibs4support-5.27.0/src/kdeui/kpixmapcache.cpp:1161:88:
|
|
error: non-constant-expression cannot be narrowed from type 'quint32' (aka 'unsigned int')
|
|
to 'time_t' (aka 'int') in initializer list [-Wc++11-narrowing]
|
|
KPixmapCacheIndexHeader indexHeader = { {0}, KPIXMAPCACHE_VERSION, 0, d->mCacheId, d->mTimestamp };
|
|
^~~~~~~~~~~~~
|
|
/wrkdirs/usr/ports/x11/kf5-kdelibs4support/work/kdelibs4support-5.27.0/src/kdeui/kpixmapcache.cpp:1161:88:
|
|
note: override this message by inserting an explicit cast
|
|
KPixmapCacheIndexHeader indexHeader = { {0}, KPIXMAPCACHE_VERSION, 0, d->mCacheId, d->mTimestamp };
|
|
^~~~~~~~~~~~~
|
|
static_cast<time_t>( )
|
|
|
|
REVIEW: 129441
|
|
---
|
|
kdeui/util/kpixmapcache.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/kdeui/kpixmapcache.cpp b/src/kdeui/kpixmapcache.cpp
|
|
index 2d175717..b7a688ba 100644
|
|
--- kdeui/util/kpixmapcache.cpp
|
|
+++ kdeui/util/kpixmapcache.cpp
|
|
@@ -1158,7 +1158,7 @@ bool KPixmapCache::recreateCacheFiles()
|
|
|
|
// We can't know the full size until custom headers written.
|
|
// mmapFiles() will take care of correcting the size.
|
|
- KPixmapCacheIndexHeader indexHeader = { {0}, KPIXMAPCACHE_VERSION, 0, d->mCacheId, d->mTimestamp };
|
|
+ KPixmapCacheIndexHeader indexHeader = { {static_cast<time_t>(0)}, KPIXMAPCACHE_VERSION, 0, d->mCacheId, static_cast<time_t>(d->mTimestamp) };
|
|
memcpy(indexHeader.magic, KPC_MAGIC, sizeof(indexHeader.magic));
|
|
|
|
indexfile.write(reinterpret_cast<char *>(&indexHeader), sizeof indexHeader);
|