{"action":"created","issue":{"url":"https://api.github.com/repos/benlau/quickandroid/issues/16","labels_url":"https://api.github.com/repos/benlau/quickandroid/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/benlau/quickandroid/issues/16/comments","events_url":"https://api.github.com/repos/benlau/quickandroid/issues/16/events","html_url":"https://github.com/benlau/quickandroid/issues/16","id":126136458,"number":16,"title":"Compie issue","user":{"login":"kneeke","id":4102889,"avatar_url":"https://avatars.githubusercontent.com/u/4102889?v=3","gravatar_id":"","url":"https://api.github.com/users/kneeke","html_url":"https://github.com/kneeke","followers_url":"https://api.github.com/users/kneeke/followers","following_url":"https://api.github.com/users/kneeke/following{/other_user}","gists_url":"https://api.github.com/users/kneeke/gists{/gist_id}","starred_url":"https://api.github.com/users/kneeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneeke/subscriptions","organizations_url":"https://api.github.com/users/kneeke/orgs","repos_url":"https://api.github.com/users/kneeke/repos","events_url":"https://api.github.com/users/kneeke/events{/privacy}","received_events_url":"https://api.github.com/users/kneeke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T09:41:30Z","updated_at":"2016-01-13T17:23:09Z","closed_at":"2016-01-13T17:21:29Z","body":"When compiing using -Wall -Werror flags, the compile fails at:\r\n\r\n```\r\n../../qaimagewriter.cpp:77:34: warning: unused parameter 'fileUrl' [-Wunused-parameter]\r\n void QAImageWriter::save(QString fileUrl)\r\n```\r\n\r\nThis could be avoided by adding a Q_UNUSED macro\r\n```\r\ndiff --git a/qaimagewriter.cpp b/qaimagewriter.cpp\r\nindex 5240fcf..bc0af0b 100644\r\n--- a/qaimagewriter.cpp\r\n+++ b/qaimagewriter.cpp\r\n@@ -76,6 +76,7 @@ void QAImageWriter::setImage(const QImage &image)\r\n \r\n void QAImageWriter::save(QString fileUrl)\r\n {\r\n+    Q_UNUSED(fileUrl)\r\n     if (m_running) {\r\n         qWarning() << \"ImageWriter::save() - It is already running.\";\r\n         return;\r\n```\r\n\r\nBut what is the reason there is a filename argument for the save function while it's not used at all? (should it not simply be removed)..\r\nWith the current function it's possible to call save with an argument, and end up with something 'wrong' without ever knowing about it..\r\n\r\nIn short:\r\nusing Q_UNUSED solves the compiler issue, but is in my opinion the wrong thing to do.\r\nleaving 2 possible solutions; 1 remove the filename as argument, or use the argument in case it's given.\r\n"},"comment":{"url":"https://api.github.com/repos/benlau/quickandroid/issues/comments/171370686","html_url":"https://github.com/benlau/quickandroid/issues/16#issuecomment-171370686","issue_url":"https://api.github.com/repos/benlau/quickandroid/issues/16","id":171370686,"user":{"login":"benlau","id":82716,"avatar_url":"https://avatars.githubusercontent.com/u/82716?v=3","gravatar_id":"","url":"https://api.github.com/users/benlau","html_url":"https://github.com/benlau","followers_url":"https://api.github.com/users/benlau/followers","following_url":"https://api.github.com/users/benlau/following{/other_user}","gists_url":"https://api.github.com/users/benlau/gists{/gist_id}","starred_url":"https://api.github.com/users/benlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlau/subscriptions","organizations_url":"https://api.github.com/users/benlau/orgs","repos_url":"https://api.github.com/users/benlau/repos","events_url":"https://api.github.com/users/benlau/events{/privacy}","received_events_url":"https://api.github.com/users/benlau/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T17:23:09Z","updated_at":"2016-01-13T17:23:09Z","body":"hi @kneeke \r\n\r\nThanks for reporting this problem. I have forgotten to implement this function. It is fixed in master branch. And I will add \"-Wall -Werror\" flag in test case for verification."}}