Fix compile warnings

This commit is contained in:
Jonas Kvinge 2019-09-19 17:44:14 +02:00
parent 2f3f4f609c
commit defc0ada78
5 changed files with 11 additions and 3 deletions

View File

@ -2171,6 +2171,8 @@ void MainWindow::CopyFilesToDevice(const QList<QUrl> &urls) {
else { else {
QMessageBox::warning(this, tr("Error"), tr("None of the selected songs were suitable for copying to a device")); QMessageBox::warning(this, tr("Error"), tr("None of the selected songs were suitable for copying to a device"));
} }
#else
Q_UNUSED(urls);
#endif #endif
} }

View File

@ -239,6 +239,8 @@ void QtSystemTrayIcon::SetVisible(bool visible) {
void QtSystemTrayIcon::SetNowPlaying(const Song &song, const QUrl &cover_url) { void QtSystemTrayIcon::SetNowPlaying(const Song &song, const QUrl &cover_url) {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
Q_UNUSED(song);
Q_UNUSED(cover_url);
// Windows doesn't support HTML in tooltips, so just show something basic // Windows doesn't support HTML in tooltips, so just show something basic
tray_->setToolTip(song.PrettyTitleWithArtist()); tray_->setToolTip(song.PrettyTitleWithArtist());
#else #else

View File

@ -602,6 +602,7 @@ int SetThreadIOPriority(IoPriority priority) {
#elif defined(Q_OS_MACOS) #elif defined(Q_OS_MACOS)
return setpriority(PRIO_DARWIN_THREAD, 0, priority == IOPRIO_CLASS_IDLE ? PRIO_DARWIN_BG : 0); return setpriority(PRIO_DARWIN_THREAD, 0, priority == IOPRIO_CLASS_IDLE ? PRIO_DARWIN_BG : 0);
#else #else
Q_UNUSED(priority);
return 0; return 0;
#endif #endif

View File

@ -136,10 +136,11 @@ void Windows7ThumbBar::HandleWinEvent(MSG *msg) {
if (hr != S_OK) if (hr != S_OK)
qLog(Debug) << "Failed to add buttons" << hex << DWORD (hr); qLog(Debug) << "Failed to add buttons" << hex << DWORD (hr);
for (int i = 0; i < actions_.count(); i++) { for (int i = 0; i < actions_.count(); i++) {
if (buttons[i].hIcon > 0) if (buttons[i].hIcon)
DestroyIcon (buttons[i].hIcon); DestroyIcon (buttons[i].hIcon);
} }
} else if (msg->message == WM_COMMAND) { }
else if (msg->message == WM_COMMAND) {
const int button_id = LOWORD(msg->wParam); const int button_id = LOWORD(msg->wParam);
if (button_id >= 0 && button_id < actions_.count()) { if (button_id >= 0 && button_id < actions_.count()) {
@ -164,7 +165,7 @@ void Windows7ThumbBar::ActionChanged() {
button->iId = i; button->iId = i;
SetupButton(action, button); SetupButton(action, button);
if (buttons->hIcon > 0) DestroyIcon(buttons->hIcon); if (buttons->hIcon) DestroyIcon(buttons->hIcon);
} }
taskbar_list->ThumbBarUpdateButtons((HWND)widget_->winId(), actions_.count(), buttons); taskbar_list->ThumbBarUpdateButtons((HWND)widget_->winId(), actions_.count(), buttons);

View File

@ -46,6 +46,8 @@ QList<DeviceFinder::Device> DirectSoundDeviceFinder::ListDevices() {
BOOL DirectSoundDeviceFinder::EnumerateCallback(LPGUID guid, LPCSTR description, LPCSTR module, LPVOID state_voidptr) { BOOL DirectSoundDeviceFinder::EnumerateCallback(LPGUID guid, LPCSTR description, LPCSTR module, LPVOID state_voidptr) {
Q_UNUSED(module);
State *state = reinterpret_cast<State*>(state_voidptr); State *state = reinterpret_cast<State*>(state_voidptr);
Device dev; Device dev;