Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows + Git Bash + Visual Studio C++ | build output is insanely noisy #14

Open
kybr opened this issue Nov 10, 2018 · 2 comments
Open

Comments

@kybr
Copy link
Member

kybr commented Nov 10, 2018

I'm on Windows 10. I've installed git, cmake, and visual studio using chocolatey:

choco install git -y 
choco install cmake -y --installargs 'ADD_CMAKE_TO_PATH=System'
choco install visualstudio2017-workload-vctools -y --package-parameters "--includeRecommended"

In this environment, the output of a successful execution of the run script dumps a LOT of noisy text into the terminal (like a bzillion very long lines). On the first execution that builds the whole of AlloLib, vctools spits out over 3 thousand warnings. Upon subsequent executions, a particular example might only dump 250 warnings. I think it might be useful for developers to actually look at some of these warnings, but I think that for users, these are just noise.

@younkhg
Copy link
Contributor

younkhg commented Nov 12, 2018

I tried compiling and also got lot of warnings (total number of about 560):

https://gist.github.com/younkhg/2d5c25ff288c53d1642d2b1be23e942f

I removed duplicate warning code from the list (with sample message) and it came down to:

warning C4244: 'return': conversion from 'float' to 'gam::index_t', possible loss of data
warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
warning C4305: 'initializing': truncation from 'double' to 'float'
warning C4477: 'fprintf' : format string '%8lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'unsigned __int64'
warning C4101: 'e': unreferenced local variable
warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
warning C4005: 'M_E': macro redefinition
warning C4146: unary minus operator applied to unsigned type, result still unsigned
warning C4099: 'al::Thread::Impl': type name first seen using 'struct' now seen using 'class'
warning C4312: 'type cast': conversion from 'unsigned long' to 'HANDLE' of greater size
warning C4804: '-': unsafe use of type 'bool' in operation
warning C4028: formal parameter 1 different from declaration

C4244, C4267, and C4305 seems to be trivial warnings we can set ignore and number of those are:

C4244: 282
C4267: 187
C4305: 13

I think we can suppress C4244, C4267, and C4305 and for other warnings I think we should try to fix the code. Also the warnings that come from headers are first to be fixed since it will appear again when compiling user project.

I can add some lines to cmake script to suppress C4244, C4267, and C4305 on MSVC if I get more agreement. It should be trivial.

@mantaraya36
Copy link
Contributor

I have removed most warnings for the debug build. Still very noisy, but good enough. We should now concentrate on changing code for remaining warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants