{"action":"created","issue":{"url":"https://api.github.com/repos/halide/Halide/issues/897","labels_url":"https://api.github.com/repos/halide/Halide/issues/897/labels{/name}","comments_url":"https://api.github.com/repos/halide/Halide/issues/897/comments","events_url":"https://api.github.com/repos/halide/Halide/issues/897/events","html_url":"https://github.com/halide/Halide/pull/897","id":99334595,"number":897,"title":"CMake enable compiler warnings","user":{"login":"delcypher","id":511795,"avatar_url":"https://avatars.githubusercontent.com/u/511795?v=3","gravatar_id":"","url":"https://api.github.com/users/delcypher","html_url":"https://github.com/delcypher","followers_url":"https://api.github.com/users/delcypher/followers","following_url":"https://api.github.com/users/delcypher/following{/other_user}","gists_url":"https://api.github.com/users/delcypher/gists{/gist_id}","starred_url":"https://api.github.com/users/delcypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delcypher/subscriptions","organizations_url":"https://api.github.com/users/delcypher/orgs","repos_url":"https://api.github.com/users/delcypher/repos","events_url":"https://api.github.com/users/delcypher/events{/privacy}","received_events_url":"https://api.github.com/users/delcypher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-06T01:42:53Z","updated_at":"2015-08-06T03:04:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/halide/Halide/pulls/897","html_url":"https://github.com/halide/Halide/pull/897","diff_url":"https://github.com/halide/Halide/pull/897.diff","patch_url":"https://github.com/halide/Halide/pull/897.patch"},"body":"I noticed this morning that the CMake build wasn't warning me about things it should be which lead me to discover that we weren't passing ``-Wall`` to the compiler. I've fixed this and also made ``-Werror`` default (controlled with WARNINGS_AS_ERRORS option) which forced me to fix several warnings in the code.\r\n\r\nI don't have a Windows machine so ``WARNINGS_AS_ERRORS`` does nothing."},"comment":{"url":"https://api.github.com/repos/halide/Halide/issues/comments/128222921","html_url":"https://github.com/halide/Halide/pull/897#issuecomment-128222921","issue_url":"https://api.github.com/repos/halide/Halide/issues/897","id":128222921,"user":{"login":"delcypher","id":511795,"avatar_url":"https://avatars.githubusercontent.com/u/511795?v=3","gravatar_id":"","url":"https://api.github.com/users/delcypher","html_url":"https://github.com/delcypher","followers_url":"https://api.github.com/users/delcypher/followers","following_url":"https://api.github.com/users/delcypher/following{/other_user}","gists_url":"https://api.github.com/users/delcypher/gists{/gist_id}","starred_url":"https://api.github.com/users/delcypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delcypher/subscriptions","organizations_url":"https://api.github.com/users/delcypher/orgs","repos_url":"https://api.github.com/users/delcypher/repos","events_url":"https://api.github.com/users/delcypher/events{/privacy}","received_events_url":"https://api.github.com/users/delcypher/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T03:04:18Z","updated_at":"2015-08-06T03:04:18Z","body":"Urgh. The build failure is due to what I mention in #898. The ``assert()`` is a no-op in the test and so the variable computed in the test to be assert looks unused to the compiler causing the ``-Werror=unused-variable``.\r\n\r\n@abadams How would you like to fix this?\r\n\r\nOne option is using ``__attribute__((unused))`` on variables like this but this doesn't really fix the underlying issue. The others are either \r\n\r\n- not treating warnings as errors\r\n- not doing release build\r\n- Fix the tests to not use ``assert()``."}}