OS X: Fix a few warnings

This commit is contained in:
Jocelyn Turcotte 2015-06-16 16:37:04 +02:00
parent a4f519eaeb
commit c98bcc8e9e
4 changed files with 8 additions and 1 deletions

View file

@ -553,6 +553,7 @@ void Folder::slotWatchedPathChanged(const QString& path)
// the sync is doing to filter out our own changes.
bool ownChange = false;
#ifdef Q_OS_MAC
Q_UNUSED(path)
// On OSX the folder watcher does not report changes done by our
// own process. Therefore nothing needs to be done here!
#else

View file

@ -47,11 +47,15 @@ static void callback(
const FSEventStreamEventFlags eventFlags[],
const FSEventStreamEventId eventIds[])
{
Q_UNUSED(streamRef)
Q_UNUSED(eventFlags)
Q_UNUSED(eventIds)
qDebug() << "FolderWatcherPrivate::callback by OS X";
QStringList paths;
CFArrayRef eventPaths = (CFArrayRef)eventPathsVoid;
for (int i = 0; i < numEvents; ++i) {
for (int i = 0; i < static_cast<int>(numEvents); ++i) {
CFStringRef path = reinterpret_cast<CFStringRef>(CFArrayGetValueAtIndex(eventPaths, i));
QString qstring;

View file

@ -183,6 +183,7 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
qint64 Utility::freeDiskSpace(const QString &path, bool *ok)
{
#if defined(Q_OS_MAC) || defined(Q_OS_FREEBSD) || defined(Q_OS_FREEBSD_KERNEL) || defined(Q_OS_NETBSD)
Q_UNUSED(ok)
struct statvfs stat;
statvfs(path.toUtf8().data(), &stat);
return (qint64) stat.f_bavail * stat.f_frsize;

View file

@ -69,6 +69,7 @@ bool hasLaunchOnStartup_private(const QString &)
void setLaunchOnStartup_private(const QString &appName, const QString& guiName, bool enable)
{
Q_UNUSED(appName)
Q_UNUSED(guiName)
QString filePath = QDir(QCoreApplication::applicationDirPath()+QLatin1String("/../..")).absolutePath();
CFStringRef folderCFStr = CFStringCreateWithCString(0, filePath.toUtf8().data(), kCFStringEncodingUTF8);