From 52923af8d765d6438d34674e15981d86b3be358e Mon Sep 17 00:00:00 2001 From: "Sungjun, Lee" Date: Mon, 9 Jan 2017 17:05:55 +0900 Subject: [PATCH] Fix Build error in eCryptfs engine Change-Id: I2513af202a3165b05dcf30ccc90261ef052b713f Signed-off-by: Sungjun, Lee --- server/engine/ecryptfs-engine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/engine/ecryptfs-engine.cpp b/server/engine/ecryptfs-engine.cpp index d4c772d..0031d32 100644 --- a/server/engine/ecryptfs-engine.cpp +++ b/server/engine/ecryptfs-engine.cpp @@ -555,9 +555,10 @@ int EcryptfsEngine::preScanForEncrypt(const char *src) if (mPreScanEncryptErr == PRESCAN_TEMP_FILE_EXIST_AND_SIZE_ERR) { result = PRESCAN_TEMP_FILE_EXIST_AND_SIZE_ERR; } else if ((mPreScanEncryptErr == PRESCAN_ERR) || (result == PRESCAN_ERR)) { +#if !defined(NDEBUG) int total = (szinfo.encsz + szinfo.largesz - szinfo.cursz + 12 * 1024) / 1024; int needed = total - szinfo.availsz / 1024; - +#endif if (isEcryptfsMountpointMounted(mPath)) { umount(); INFO("Unmounting mpath <" + std::string(mPath) + ">"); @@ -613,9 +614,10 @@ int EcryptfsEngine::preScanForDecrypt(const char *src) if (mPreScanEncryptErr == PRESCAN_TEMP_FILE_EXIST_AND_SIZE_ERR) { result = PRESCAN_TEMP_FILE_EXIST_AND_SIZE_ERR; } else if ((mPreScanEncryptErr == PRESCAN_ERR) || (result == PRESCAN_ERR)) { +#if !defined(NDEBUG) int total = (szinfo.encsz + szinfo.largesz - szinfo.cursz + 12 * 1024) / 1024; int needed = total - szinfo.availsz / 1024; - +#endif if (isEcryptfsMountpointMounted(mPath)) { umount(); INFO("Unmounting mpath <" + std::string(mPath) + ">"); -- 2.7.4