{"action":"created","issue":{"url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/440","repository_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn","labels_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/440/comments","events_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/440/events","html_url":"https://github.com/tiny-dnn/tiny-dnn/issues/440","id":193320358,"number":440,"title":"Compiler issues a lot of warnings during compilation","user":{"login":"festlv","id":212238,"avatar_url":"https://avatars.githubusercontent.com/u/212238?v=3","gravatar_id":"","url":"https://api.github.com/users/festlv","html_url":"https://github.com/festlv","followers_url":"https://api.github.com/users/festlv/followers","following_url":"https://api.github.com/users/festlv/following{/other_user}","gists_url":"https://api.github.com/users/festlv/gists{/gist_id}","starred_url":"https://api.github.com/users/festlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/festlv/subscriptions","organizations_url":"https://api.github.com/users/festlv/orgs","repos_url":"https://api.github.com/users/festlv/repos","events_url":"https://api.github.com/users/festlv/events{/privacy}","received_events_url":"https://api.github.com/users/festlv/received_events","type":"User","site_admin":false},"labels":[{"id":313529442,"url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/labels/contributions%20welcome","name":"contributions welcome","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-12-03T23:29:38Z","updated_at":"2016-12-09T12:31:49Z","closed_at":null,"body":"I tried to use tiny-dnn in an existing project but got a lot of warnings by just including tiny-dnn.h\r\nThe list of warnings is available here: https://paste.ee/p/0mPze\r\n\r\nWarnings are possibly related to project's compiler flags (which are the strictest that I know of):\r\n> -Werror -Wall -Wextra -Wpedantic\r\n\r\nGCC version:\r\n\r\n> Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release\r\n> Thread model: posix\r\n> gcc version 6.2.1 20160830 (GCC) \r\n\r\nSince I had -Werror, these warnings were treated as errors and I had to loosen the flags to build tiiny-dnn.\r\n\r\nBy quickly scanning the list, I see two types of warnings:\r\n\r\n1. Issues in stb_image.h (should be reported upstream?)\r\n2. Unused parameters when some feature is turned off:\r\n```\r\ninline void func(int param1) {\r\n#if defined(USE_OPENCL) || defined(USE_CUDA)\r\n  //code that uses params1\r\n#else\r\n    nn_warn(\"TinyDNN was not build with OpenCL or CUDA support.\");\r\n#endif\r\n}\r\n```\r\n\r\n@bhack suggested to propose one of these mechanisms: https://sites.google.com/site/opensourceconstriubtions/ettl-martin-1/articles/suppress-unused-parameter-compiler-warning\r\n\r\nSince I have very little knowledge about typical environments/compilers where tiny-dnn is being used I will refrain from suggesting any particular way to fix the warnings (or whether or not they need to be fixed at all)."},"comment":{"url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/comments/266003254","html_url":"https://github.com/tiny-dnn/tiny-dnn/issues/440#issuecomment-266003254","issue_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/440","id":266003254,"user":{"login":"bhack","id":1710528,"avatar_url":"https://avatars.githubusercontent.com/u/1710528?v=3","gravatar_id":"","url":"https://api.github.com/users/bhack","html_url":"https://github.com/bhack","followers_url":"https://api.github.com/users/bhack/followers","following_url":"https://api.github.com/users/bhack/following{/other_user}","gists_url":"https://api.github.com/users/bhack/gists{/gist_id}","starred_url":"https://api.github.com/users/bhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhack/subscriptions","organizations_url":"https://api.github.com/users/bhack/orgs","repos_url":"https://api.github.com/users/bhack/repos","events_url":"https://api.github.com/users/bhack/events{/privacy}","received_events_url":"https://api.github.com/users/bhack/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T12:31:49Z","updated_at":"2016-12-09T12:31:49Z","body":"@festlv What is the status of this issue? Need we only to resync with stb and gemmlowp?"}}
{"actor":{"display_login":"bhack"}}