Fix Build error in eCryptfs engine 07/109207/1
authorSungjun, Lee <sjun221.lee@samsung.com>
Mon, 9 Jan 2017 08:05:55 +0000 (17:05 +0900)
committerSungjun, Lee <sjun221.lee@samsung.com>
Mon, 9 Jan 2017 08:05:55 +0000 (17:05 +0900)
Change-Id: I2513af202a3165b05dcf30ccc90261ef052b713f
Signed-off-by: Sungjun, Lee <sjun221.lee@samsung.com>
server/engine/ecryptfs-engine.cpp

index d4c772d..0031d32 100644 (file)
@@ -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) + ">");