{"action":"created","issue":{"url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/31","repository_url":"https://api.github.com/repos/decimad/luabind-deboostified","labels_url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/31/comments","events_url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/31/events","html_url":"https://github.com/decimad/luabind-deboostified/issues/31","id":240285618,"number":31,"title":"Dead code warning of Coverity Scan on \"luabind/detail/format_signature.hpp\"","user":{"login":"Wohlstand","id":6751442,"avatar_url":"https://avatars2.githubusercontent.com/u/6751442?v=3","gravatar_id":"","url":"https://api.github.com/users/Wohlstand","html_url":"https://github.com/Wohlstand","followers_url":"https://api.github.com/users/Wohlstand/followers","following_url":"https://api.github.com/users/Wohlstand/following{/other_user}","gists_url":"https://api.github.com/users/Wohlstand/gists{/gist_id}","starred_url":"https://api.github.com/users/Wohlstand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wohlstand/subscriptions","organizations_url":"https://api.github.com/users/Wohlstand/orgs","repos_url":"https://api.github.com/users/Wohlstand/repos","events_url":"https://api.github.com/users/Wohlstand/events{/privacy}","received_events_url":"https://api.github.com/users/Wohlstand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-07-04T00:28:33Z","updated_at":"2017-07-04T20:13:27Z","closed_at":null,"body":"Coverity Scan results a next warning in the `luabind/detail/format_signature.hpp` file:\r\n```\r\n140                        lua_pushstring(L, \")\");\r\n\r\n   assignment: Assigning: sz = luabind::meta::size<luabind::meta::type_list<void, PGE_Texture const *, double, double, float, lua_State *> >::value.\r\n\r\n141                        size_t sz = meta::size<Signature>::value;\r\n142                        size_t ncat = sz * 2 + 2;\r\n\r\n   const: At condition sz == 1UL, the value of sz must be equal to 6.\r\n   dead_error_condition: The condition sz == 1UL cannot be true.\r\n\r\n143                        if(sz == 1)\r\n\r\n   CID 1368487 (#15 of 15): Logically dead code (DEADCODE)dead_error_line: Execution cannot reach this statement: ++ncat;.\r\n\r\n144                                ++ncat;\r\n145                        lua_concat(L, ncat);\r\n```\r\nBecause the \"Signature\" type was given by template, it is possible a false positive (code is alive when template has given that \"Signature\" which will produce result of `meta::size<Signature>::value` equal to 1)."},"comment":{"url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/comments/312947047","html_url":"https://github.com/decimad/luabind-deboostified/issues/31#issuecomment-312947047","issue_url":"https://api.github.com/repos/decimad/luabind-deboostified/issues/31","id":312947047,"user":{"login":"decimad","id":2931955,"avatar_url":"https://avatars0.githubusercontent.com/u/2931955?v=3","gravatar_id":"","url":"https://api.github.com/users/decimad","html_url":"https://github.com/decimad","followers_url":"https://api.github.com/users/decimad/followers","following_url":"https://api.github.com/users/decimad/following{/other_user}","gists_url":"https://api.github.com/users/decimad/gists{/gist_id}","starred_url":"https://api.github.com/users/decimad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decimad/subscriptions","organizations_url":"https://api.github.com/users/decimad/orgs","repos_url":"https://api.github.com/users/decimad/repos","events_url":"https://api.github.com/users/decimad/events{/privacy}","received_events_url":"https://api.github.com/users/decimad/received_events","type":"User","site_admin":false},"created_at":"2017-07-04T20:13:27Z","updated_at":"2017-07-04T20:13:27Z","body":"Hrmm, I feel uneasy adding enable_if tricks for a static analysis. Maybe removing \"ncat\" in favor for duplicate calls to meta::size<Signature>::value would do the trick already?"}}
{"actor":{"display_login":"decimad"}}