{"action":"created","issue":{"url":"https://api.github.com/repos/google/google-authenticator/issues/426","repository_url":"https://api.github.com/repos/google/google-authenticator","labels_url":"https://api.github.com/repos/google/google-authenticator/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/google/google-authenticator/issues/426/comments","events_url":"https://api.github.com/repos/google/google-authenticator/issues/426/events","html_url":"https://github.com/google/google-authenticator/issues/426","id":45456039,"number":426,"title":"Compiler warnings when using Clang on FreeBSD 10.0","user":{"login":"ThomasHabets","id":6056,"avatar_url":"https://avatars.githubusercontent.com/u/6056?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasHabets","html_url":"https://github.com/ThomasHabets","followers_url":"https://api.github.com/users/ThomasHabets/followers","following_url":"https://api.github.com/users/ThomasHabets/following{/other_user}","gists_url":"https://api.github.com/users/ThomasHabets/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasHabets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasHabets/subscriptions","organizations_url":"https://api.github.com/users/ThomasHabets/orgs","repos_url":"https://api.github.com/users/ThomasHabets/repos","events_url":"https://api.github.com/users/ThomasHabets/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasHabets/received_events","type":"User","site_admin":false},"labels":[{"id":135947428,"url":"https://api.github.com/repos/google/google-authenticator/labels/bug","name":"bug","color":"fc2929","default":true},{"id":136463048,"url":"https://api.github.com/repos/google/google-authenticator/labels/libpam","name":"libpam","color":"5319e7","default":false},{"id":136462439,"url":"https://api.github.com/repos/google/google-authenticator/labels/Priority-Medium","name":"Priority-Medium","color":"ededed","default":false},{"id":136462438,"url":"https://api.github.com/repos/google/google-authenticator/labels/Type-Defect","name":"Type-Defect","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2014-10-10T08:07:35Z","updated_at":"2016-11-09T10:15:26Z","closed_at":null,"body":"Original [issue 427](https://code.google.com/p/google-authenticator/issues/detail?id=427) created by rsimmons0 on 2014-08-26T16:12:51.000Z:\n\n<b>What steps will reproduce the problem?</b>\nDownload current revision 1d0bf2e6cff7\nBuild libpam on FreeBSD 10.0\n\n<b>What is the expected output? What do you see instead?</b>\nNo warnings expected. The warnings in question are below.\n\n<b>What version of the product are you using? On what operating system?</b>\nrevision 1d0bf2e6cff7 on FreeBSD 10.0-RELEASE-p7\n\n<b>Please provide any additional information below.</b>\ncc --std=gnu99 -Wall -O2 -g -fPIC -c  -fvisibility=hidden -O2 -pipe -fno-strict-aliasing -o pam_google_authenticator.o pam_google_authenticator.c\npam_google_authenticator.c:777:49: warning: initializing 'char _' with an expression of type 'const char *' discards qualifiers\n      [-Wincompatible-pointer-types-discards-qualifiers]\n                                   .msg       = prompt };\n                                                ^~~~~~\npam_google_authenticator.c:973:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                     ~~~~~~^~~~~~~~~~~~\npam_google_authenticator.c:973:44: note: use array indexing to silence this warning\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                           ^\n                                     &amp;     [           ]\npam_google_authenticator.c:1132:48: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !_reset, tms[i], skews[i]);\n                                      ~~~~~~~~~^~~~~~~~~\npam_google_authenticator.c:1132:48: note: use array indexing to silence this warning\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !*reset, tms[i], skews[i]);\n                                               ^\n                                      &amp;        [        ]\n3 warnings generated.\n\ncc --std=gnu99 -Wall -O2 -g -fPIC -c  -fvisibility=hidden -O2 -pipe -fno-strict-aliasing -o demo.o demo.c\ndemo.c:88:37: warning: 'memcpy' call operates on objects of type 'const char _' while the size is based on a different type 'const char *_'\n      [-Wsizeof-pointer-memaccess]\n      memcpy(item, &amp;service, sizeof(&amp;service));\n                   ~~~~~~~~         ^~~~~~~~\ndemo.c:88:37: note: did you mean to remove the addressof in the argument to 'sizeof' (and multiply it by the number of elements)?\n      memcpy(item, &amp;service, sizeof(&amp;service));\n                                    ^~~~~~~~\ndemo.c:93:34: warning: 'memcpy' call operates on objects of type 'char _' while the size is based on a different type 'char *_'\n      [-Wsizeof-pointer-memaccess]\n      memcpy(item, &amp;user, sizeof(&amp;user));\n                   ~~~~~         ^~~~~\ndemo.c:93:34: note: did you mean to remove the addressof in the argument to 'sizeof' (and multiply it by the number of elements)?\n      memcpy(item, &amp;user, sizeof(&amp;user));\n                                 ^~~~~\n2 warnings generated.\n\ncc -DDEMO --std=gnu99 -Wall -O2 -g -fPIC -c  -fvisibility=hidden -O2 -pipe -fno-strict-aliasing -o pam_google_authenticator_demo.o pam_google_authenticator.c\npam_google_authenticator.c:777:49: warning: initializing 'char _' with an expression of type 'const char *' discards qualifiers\n      [-Wincompatible-pointer-types-discards-qualifiers]\n                                   .msg       = prompt };\n                                                ^~~~~~\npam_google_authenticator.c:973:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                     ~~~~~~^~~~~~~~~~~~\npam_google_authenticator.c:973:44: note: use array indexing to silence this warning\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                           ^\n                                     &amp;     [           ]\npam_google_authenticator.c:1132:48: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !_reset, tms[i], skews[i]);\n                                      ~~~~~~~~~^~~~~~~~~\npam_google_authenticator.c:1132:48: note: use array indexing to silence this warning\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !*reset, tms[i], skews[i]);\n                                               ^\n                                      &amp;        [        ]\n3 warnings generated.\n\ncc -DTESTING --std=gnu99 -Wall -O2 -g -fPIC -c  -fvisibility=hidden -O2 -pipe -fno-strict-aliasing       \\\n              -o pam_google_authenticator_testing.o pam_google_authenticator.c\npam_google_authenticator.c:777:49: warning: initializing 'char _' with an expression of type 'const char *' discards qualifiers\n      [-Wincompatible-pointer-types-discards-qualifiers]\n                                   .msg       = prompt };\n                                                ^~~~~~\npam_google_authenticator.c:973:44: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                     ~~~~~~^~~~~~~~~~~~\npam_google_authenticator.c:973:44: note: use array indexing to silence this warning\n  sprintf(strrchr(disallow, '\\000'), &quot; %d&quot; + !_disallow, tm);\n                                           ^\n                                     &amp;     [           ]\npam_google_authenticator.c:1132:48: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !_reset, tms[i], skews[i]);\n                                      ~~~~~~~~~^~~~~~~~~\npam_google_authenticator.c:1132:48: note: use array indexing to silence this warning\n      sprintf(strrchr(reset, '\\000'), &quot; %d%+d&quot; + !*reset, tms[i], skews[i]);\n                                               ^\n                                      &amp;        [        ]\n3 warnings generated.\n\ncc --std=gnu99 -Wall -O2 -g -fPIC -c  -fvisibility=hidden -O2 -pipe -fno-strict-aliasing -o pam_google_authenticator_unittest.o pam_google_authenticator_unittest.c\npam_google_authenticator_unittest.c:79:37: warning: 'memcpy' call operates on objects of type 'const char _' while the size is based on a different\n      type 'const char *_' [-Wsizeof-pointer-memaccess]\n      memcpy(item, &amp;service, sizeof(&amp;service));\n                   ~~~~~~~~         ^~~~~~~~\npam_google_authenticator_unittest.c:79:37: note: did you mean to remove the addressof in the argument to 'sizeof'\n      (and multiply it by the number of elements)?\n      memcpy(item, &amp;service, sizeof(&amp;service));\n                                    ^~~~~~~~\npam_google_authenticator_unittest.c:84:34: warning: 'memcpy' call operates on objects of type 'char _' while the size is based on a different type\n      'char *_' [-Wsizeof-pointer-memaccess]\n      memcpy(item, &amp;user, sizeof(&amp;user));\n                   ~~~~~         ^~~~~\npam_google_authenticator_unittest.c:84:34: note: did you mean to remove the addressof in the argument to 'sizeof'\n      (and multiply it by the number of elements)?\n      memcpy(item, &amp;user, sizeof(&amp;user));\n                                 ^~~~~\n2 warnings generated.\n"},"comment":{"url":"https://api.github.com/repos/google/google-authenticator/issues/comments/259379142","html_url":"https://github.com/google/google-authenticator/issues/426#issuecomment-259379142","issue_url":"https://api.github.com/repos/google/google-authenticator/issues/426","id":259379142,"user":{"login":"ThomasHabets","id":6056,"avatar_url":"https://avatars.githubusercontent.com/u/6056?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasHabets","html_url":"https://github.com/ThomasHabets","followers_url":"https://api.github.com/users/ThomasHabets/followers","following_url":"https://api.github.com/users/ThomasHabets/following{/other_user}","gists_url":"https://api.github.com/users/ThomasHabets/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasHabets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasHabets/subscriptions","organizations_url":"https://api.github.com/users/ThomasHabets/orgs","repos_url":"https://api.github.com/users/ThomasHabets/repos","events_url":"https://api.github.com/users/ThomasHabets/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasHabets/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T10:15:26Z","updated_at":"2016-11-09T10:15:26Z","body":"This issue was moved to google/google-authenticator-libpam#9"}}
{"actor":{"display_login":"ThomasHabets"}}