Qt Build Warnings mute it
-
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 ?@repl
I believe you are usinggcc(or maybemingw).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.htmlTo 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....
-
-
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 ?@repl said in Qt Build Warnings mute it:
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...