From 83ba186572571f97abb4b8daf368d5886b9628d4 Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Thu, 29 Nov 2012 14:37:33 +0000 Subject: [PATCH] avoid const warnings --- src/jrd/nbak.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jrd/nbak.cpp b/src/jrd/nbak.cpp index 15cccf77b7..a59c6dd97a 100644 --- a/src/jrd/nbak.cpp +++ b/src/jrd/nbak.cpp @@ -258,23 +258,23 @@ void BackupManager::beginBackup(thread_db* tdbb) { struct stat st; PageSpace* pageSpace = database->dbb_page_manager.findPageSpace(DB_PAGE_SPACE); - char* func = NULL; + const char* func = NULL; while (!func && fstat(pageSpace->file->fil_desc, &st) != 0) { - if (errno != EINTR) + if (errno != EINTR) func = "fstat"; } while (!func && fchown(diff_file->fil_desc, st.st_uid, st.st_gid) != 0) { - if (errno != EINTR) + if (errno != EINTR) func = "fchown"; } while (!func && fchmod(diff_file->fil_desc, st.st_mode) != 0) { - if (errno != EINTR) + if (errno != EINTR) func = "fchmod"; } - if (func) + if (func) { stateGuard.setSuccess(); Firebird::system_call_failed::raise(func);