summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-04-16 21:09:19 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-04-16 21:09:19 +0000
commit8d24f97c2c6990132bccb3a753007e3b7c004826 (patch)
tree78d25793a38a1a76956a5f84e1ff3a4683c17dab /rbutil/rbutilqt/rbsettings.cpp
parente82aedd45127ef7aec06d98196c89c691aedc9c8 (diff)
downloadrockbox-8d24f97c2c6990132bccb3a753007e3b7c004826.tar.gz
rockbox-8d24f97c2c6990132bccb3a753007e3b7c004826.tar.bz2
rockbox-8d24f97c2c6990132bccb3a753007e3b7c004826.zip
Explicitly drop the chown() result to remove a gcc warning. chown() is warn_unused_result but we can't do anything useful in this case and it isn't a problem anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20718 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 560b9ab5fc..5a60a67c1b 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -65,7 +65,10 @@ void RbSettings::sync()
{
int realuid = atoi(realuser);
int realgid = atoi(realgroup);
- chown(qPrintable(userSettings->fileName()), realuid, realgid);
+ // chown is attribute warn_unused_result, but in case this fails
+ // we can't do anything useful about it. Notifying the user
+ // is somewhat pointless. Add hack to suppress compiler warning.
+ if(chown(qPrintable(userSettings->fileName()), realuid, realgid));
}
}
#endif