From: Sungjun, Lee Date: Mon, 9 Jan 2017 08:05:55 +0000 (+0900) Subject: Fix Build error in eCryptfs engine X-Git-Tag: submit/tizen/20170213.020148~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F109207%2F1;p=platform%2Fcore%2Fsecurity%2Fode.git Fix Build error in eCryptfs engine Change-Id: I2513af202a3165b05dcf30ccc90261ef052b713f Signed-off-by: Sungjun, Lee --- 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) + ">");