[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kpmcore] src/plugins/libparted: Fix build on clang.
From: Teo Mrnjavac <teo () kde ! org>
Date: 2016-05-16 13:54:32
Message-ID: E1b2Iye-0006At-BU () scm ! kde ! org
[Download RAW message or body]
Git commit 9d6438f0af3c2ba858245152ba57225c4a53b143 by Teo Mrnjavac.
Committed on 16/05/2016 at 13:54.
Pushed by mrnjavac into branch 'master'.
Fix build on clang.
M +5 -1 src/plugins/libparted/libpartedpartitiontable.cpp
http://commits.kde.org/kpmcore/9d6438f0af3c2ba858245152ba57225c4a53b143
diff --git a/src/plugins/libparted/libpartedpartitiontable.cpp \
b/src/plugins/libparted/libpartedpartitiontable.cpp index a369e43..33e4792 100644
--- a/src/plugins/libparted/libpartedpartitiontable.cpp
+++ b/src/plugins/libparted/libpartedpartitiontable.cpp
@@ -241,7 +241,11 @@ bool LibPartedPartitionTable::clobberFileSystem(Report& report, \
const Partition&
if (pedPartition->type == PED_PARTITION_NORMAL || pedPartition->type == \
PED_PARTITION_LOGICAL) { if (ped_device_open(pedDevice())) {
//reiser4 stores "ReIsEr4" at sector 128 with a sector size of 512 \
bytes
- char zeroes[pedDevice()->sector_size*129] = {0};
+
+ // We need to use memset instead of = {0} because clang sucks.
+ char zeroes[pedDevice()->sector_size*129];
+ memset(zeroes, 0, pedDevice()->sector_size*129*sizeof(long long));
+
rval = ped_geometry_write(&pedPartition->geom, zeroes, 0, 129);
if (!rval)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic