{"action":"created","issue":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/161","repository_url":"https://api.github.com/repos/android-ndk/ndk","labels_url":"https://api.github.com/repos/android-ndk/ndk/issues/161/labels{/name}","comments_url":"https://api.github.com/repos/android-ndk/ndk/issues/161/comments","events_url":"https://api.github.com/repos/android-ndk/ndk/issues/161/events","html_url":"https://github.com/android-ndk/ndk/issues/161","id":165783840,"number":161,"title":"Unable to give `-Wno-error=#warnings` flag to clang","user":{"login":"DoDoENT","id":158844,"avatar_url":"https://avatars.githubusercontent.com/u/158844?v=3","gravatar_id":"","url":"https://api.github.com/users/DoDoENT","html_url":"https://github.com/DoDoENT","followers_url":"https://api.github.com/users/DoDoENT/followers","following_url":"https://api.github.com/users/DoDoENT/following{/other_user}","gists_url":"https://api.github.com/users/DoDoENT/gists{/gist_id}","starred_url":"https://api.github.com/users/DoDoENT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoDoENT/subscriptions","organizations_url":"https://api.github.com/users/DoDoENT/orgs","repos_url":"https://api.github.com/users/DoDoENT/repos","events_url":"https://api.github.com/users/DoDoENT/events{/privacy}","received_events_url":"https://api.github.com/users/DoDoENT/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"assignees":[{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/android-ndk/ndk/milestones/5","html_url":"https://github.com/android-ndk/ndk/milestones/r14","labels_url":"https://api.github.com/repos/android-ndk/ndk/milestones/5/labels","id":1886319,"number":5,"title":"r14","description":"","creator":{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":1,"state":"open","created_at":"2016-07-15T18:17:54Z","updated_at":"2016-09-13T21:34:52Z","due_on":"2016-12-09T08:00:00Z","closed_at":null},"comments":4,"created_at":"2016-07-15T13:13:16Z","updated_at":"2016-09-15T16:06:37Z","closed_at":null,"body":"I've explained the issue in [this StackOverflow question](https://stackoverflow.com/questions/38396721/how-to-properly-escape-hash-in-android-mk). At first I thought I am doing something wrong, but then I found out that this may be an `ndk-build` issue.\r\n\r\nFor convenience, I am including the original SO question here:\r\n\r\n> I am using `-Werror` flag to treat all warnings as errors in my code. However, I would like compile warnings issued from code to still be treated as warnings. A GCC option for this is `-Wno-error=cpp` which works correctly, however clang option is `-Wno-error=#warnings` which I don't know how to pass to `clang` from `Android.mk`.\r\n\r\n> I've tried this:\r\n\r\n    ifeq \"$(findstring clang,$(NDK_TOOLCHAIN_VERSION))\" \"clang\"\r\n        LOCAL_CFLAGS += -Wno-error=#warnings\r\n    endif\r\n\r\n> and this (as suggested in [this SO answer](http://stackoverflow.com/a/7860705/213057)):\r\n\r\n    ifeq \"$(findstring clang,$(NDK_TOOLCHAIN_VERSION))\" \"clang\"\r\n        LOCAL_CFLAGS += -Wno-error=\\#warnings\r\n    endif\r\n\r\n> However, both versions treat `#` as beginning of comment and `ndk-build` passes `-Wno-error=` to compiler (i.e. everything after `=` is ignored) - I inspected that with `ndk-build -n`.\r\n\r\n> I even tried\r\n\r\n    ifeq \"$(findstring clang,$(NDK_TOOLCHAIN_VERSION))\" \"clang\"\r\n        LOCAL_CFLAGS += -Wno-error=\\\\#warnings\r\n    endif\r\n\r\n> which produces `-Wno-error=\\` compiler flag.\r\n\r\n> How to properly pass this compiler flag to clang from `Android.mk` file?\r\n\r\n> I am using NDK r12b.\r\n\r\n> EDIT:\r\n> I even tried this:\r\n\r\n    ifeq \"$(findstring clang,$(NDK_TOOLCHAIN_VERSION))\" \"clang\"\r\n        VAR=\\#warnings\r\n        $(info VAR is '$(VAR)')\r\n        LOCAL_CFLAGS += -Wno-error=$(VAR)\r\n    endif\r\n\r\n> and `ndk-build` first outputs message `VAR is '#warnings'` yet compiler arguments contain `-Wno-error=`. This is obviously an NDK issue."},"comment":{"url":"https://api.github.com/repos/android-ndk/ndk/issues/comments/247373023","html_url":"https://github.com/android-ndk/ndk/issues/161#issuecomment-247373023","issue_url":"https://api.github.com/repos/android-ndk/ndk/issues/161","id":247373023,"user":{"login":"DanAlbert","id":315852,"avatar_url":"https://avatars.githubusercontent.com/u/315852?v=3","gravatar_id":"","url":"https://api.github.com/users/DanAlbert","html_url":"https://github.com/DanAlbert","followers_url":"https://api.github.com/users/DanAlbert/followers","following_url":"https://api.github.com/users/DanAlbert/following{/other_user}","gists_url":"https://api.github.com/users/DanAlbert/gists{/gist_id}","starred_url":"https://api.github.com/users/DanAlbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanAlbert/subscriptions","organizations_url":"https://api.github.com/users/DanAlbert/orgs","repos_url":"https://api.github.com/users/DanAlbert/repos","events_url":"https://api.github.com/users/DanAlbert/events{/privacy}","received_events_url":"https://api.github.com/users/DanAlbert/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T16:06:36Z","updated_at":"2016-09-15T16:06:36Z","body":"I'll keep it open, but I haven't heard anyone else encounter this, so I'll think of it as lower priority. Thanks for letting me know."}}
{"actor":{"display_login":"DanAlbert"}}