aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2016-08-30 21:50:21 +0200
committerWillem Jan Palenstijn2016-08-30 21:53:21 +0200
commitfb592a0dbda7b57c38b643e4f04ca9640c6986af (patch)
tree9a2bbe9899e22bbb2ea941938e375826312cee61
parentd60879b535076f6d513755c918f80b905dd352a9 (diff)
downloadscummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.tar.gz
scummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.tar.bz2
scummvm-rg350-fb592a0dbda7b57c38b643e4f04ca9640c6986af.zip
BACKENDS: Rename variable shadowing function
-rw-r--r--backends/fs/chroot/chroot-fs.cpp2
-rw-r--r--backends/fs/posix/posix-fs.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/backends/fs/chroot/chroot-fs.cpp b/backends/fs/chroot/chroot-fs.cpp
index f5f7c84570..be6805bbd8 100644
--- a/backends/fs/chroot/chroot-fs.cpp
+++ b/backends/fs/chroot/chroot-fs.cpp
@@ -108,7 +108,7 @@ Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
return _realNode->createWriteStream();
}
-bool ChRootFilesystemNode::create(bool isDirectory) {
+bool ChRootFilesystemNode::create(bool /*isDir*/) {
error("Not supported");
return false;
}
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 8597158f4c..746ae6a5a0 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -253,10 +253,10 @@ Common::WriteStream *POSIXFilesystemNode::createWriteStream() {
return StdioStream::makeFromPath(getPath(), true);
}
-bool POSIXFilesystemNode::create(bool isDirectory) {
+bool POSIXFilesystemNode::create(bool isDir) {
bool success;
- if (isDirectory) {
+ if (isDir) {
success = mkdir(_path.c_str(), 0755) == 0;
} else {
int fd = open(_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0755);
@@ -270,12 +270,12 @@ bool POSIXFilesystemNode::create(bool isDirectory) {
if (success) {
setFlags();
if (_isValid) {
- if (_isDirectory != isDirectory) warning("failed to create %s: got %s", isDirectory ? "directory" : "file", _isDirectory ? "directory" : "file");
- return _isDirectory == isDirectory;
+ if (_isDirectory != isDir) warning("failed to create %s: got %s", isDir ? "directory" : "file", _isDirectory ? "directory" : "file");
+ return _isDirectory == isDir;
}
warning("POSIXFilesystemNode: %s() was a success, but stat indicates there is no such %s",
- isDirectory ? "mkdir" : "creat", isDirectory ? "directory" : "file");
+ isDir ? "mkdir" : "creat", isDir ? "directory" : "file");
return false;
}