{"action":"closed","issue":{"url":"https://api.github.com/repos/awslabs/s2n/issues/437","repository_url":"https://api.github.com/repos/awslabs/s2n","labels_url":"https://api.github.com/repos/awslabs/s2n/issues/437/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/s2n/issues/437/comments","events_url":"https://api.github.com/repos/awslabs/s2n/issues/437/events","html_url":"https://github.com/awslabs/s2n/issues/437","id":214795806,"number":437,"title":"Issues found when running updated cppcheck","user":{"login":"danielsn","id":4389518,"avatar_url":"https://avatars1.githubusercontent.com/u/4389518?v=3","gravatar_id":"","url":"https://api.github.com/users/danielsn","html_url":"https://github.com/danielsn","followers_url":"https://api.github.com/users/danielsn/followers","following_url":"https://api.github.com/users/danielsn/following{/other_user}","gists_url":"https://api.github.com/users/danielsn/gists{/gist_id}","starred_url":"https://api.github.com/users/danielsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielsn/subscriptions","organizations_url":"https://api.github.com/users/danielsn/orgs","repos_url":"https://api.github.com/users/danielsn/repos","events_url":"https://api.github.com/users/danielsn/events{/privacy}","received_events_url":"https://api.github.com/users/danielsn/received_events","type":"User","site_admin":false},"labels":[{"id":543978818,"url":"https://api.github.com/repos/awslabs/s2n/labels/priority/high","name":"priority/high","color":"e99695","default":false},{"id":543979920,"url":"https://api.github.com/repos/awslabs/s2n/labels/size/small","name":"size/small","color":"ddd1fc","default":false},{"id":543982285,"url":"https://api.github.com/repos/awslabs/s2n/labels/status/work_in_progress","name":"status/work_in_progress","color":"cccccc","default":false},{"id":543977557,"url":"https://api.github.com/repos/awslabs/s2n/labels/type/test","name":"type/test","color":"1d76db","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-16T18:21:53Z","updated_at":"2017-03-28T17:59:21Z","closed_at":"2017-03-28T17:59:21Z","body":"I was trying to upgrade the travis os to Trusty, and as part of that cppcheck was upgraded to \"Cppcheck 1.61\"\r\n\r\nThis new version reports several issues that the old one did not.\r\n\r\n```\r\n$ cppcheck --std=c99 --error-exitcode=-1 --quiet -j 8 --enable=style,performance,portability,information,missingInclude --suppressions-list=.travis/cppcheck_suppressions.txt -I ./tests api bin crypto error stuffer tests tls utils || FAILED=1\r\n[tests/unit/s2n_record_size_test.c:65]: (style) The scope of the variable 'large_aligned_payload' can be reduced.\r\n[tests/unit/s2n_ssl_prf_test.c:37]: (style) The scope of the variable 'premaster_secret_hex_in' can be reduced.\r\n[tests/unit/s2n_ssl_prf_test.c:38]: (style) The scope of the variable 'client_random_hex_in' can be reduced.\r\n[tests/unit/s2n_ssl_prf_test.c:39]: (style) The scope of the variable 'server_random_hex_in' can be reduced.\r\n[tests/unit/s2n_ssl_prf_test.c:40]: (style) The scope of the variable 'master_secret_hex_in' can be reduced.\r\n[tests/unit/s2n_tls_prf_test.c:38]: (style) The scope of the variable 'premaster_secret_hex_in' can be reduced.\r\n[tests/unit/s2n_tls_prf_test.c:39]: (style) The scope of the variable 'client_random_hex_in' can be reduced.\r\n[tests/unit/s2n_tls_prf_test.c:40]: (style) The scope of the variable 'server_random_hex_in' can be reduced.\r\n[tests/unit/s2n_tls_prf_test.c:41]: (style) The scope of the variable 'master_secret_hex_in' can be reduced.\r\n[utils/s2n_map.c:63]: (error) Uninitialized variable: digest\r\n[utils/s2n_mem.c:1]: (information) Skipping configuration 'MADV_DONTDUMP' since the value of 'MADV_DONTDUMP' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.\r\n[utils/s2n_safety.c:1]: (information) Skipping configuration 'SYS_getpid;__GNUC__' since the value of 'SYS_getpid' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.\r\n[utils/s2n_random.c:1]: (information) Skipping configuration 'MAP_INHERIT_ZERO' since the value of 'MAP_INHERIT_ZERO' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.\r\n[utils/s2n_random.c]: (information) Unmatched suppression: unusedStructMember\r\n[utils/s2n_socket.c:1]: (information) Skipping configuration 'SO_RCVLOWAT' since the value of 'SO_RCVLOWAT' is unknown. Use -D if you want to check it. You can use -U to skip it explicitly.\r\n```\r\n\r\n1. For the style issues in the tests, should I add them to the cppcheck suppressions, or submit a pull request to fix them?\r\n\r\n2. For the \"unitilized variable\" error, I believe this is a cppcheck malfunction, probably because it doesn't understand how the union is being used.  Can someone confirm, in which case I will also make it a cppcheck suppression.\r\n\r\n3. For the information issues, do we care? I was going to suppress them as well unless there is a good reason not to.\r\nThanks."}}
{"actor":{"display_login":"alexw91"}}