Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Build Warnings mute it
repl last edited by
while building my Qt code, It is showing so many warnings along with errors. How to stop and make to show only errors
Also facing an error
error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive]
How to resolve it ?
JonB last edited by
I believe you are using
To change to suppress warnings, you probably pass flag
-Wallat present, maybe also
-Wextra. Removing these flag(s) would get rid of them. You could add
-wto inhibit all warning messages. A complete list is shown at https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
To get rid of the "loses precision" error you need to pass
-fpermissiveflag. If you are doing that and you still get warning you might need to put into your/the offending code the line:
#pragma GCC diagnostic ignored "-fpermissive"
However in all these cases you would be best leaving warnings on and fix the actual code to be correct. There is a reason warnings are there....
long unsigned int
this is 32bit. sizeof(void*) is 64bit on 64bit systems. So, you're trying to store a 64bit value in a 32bit variable...