Helloworld.c:6:4: error: assignment makes pointer from integer without a cast Now, lets force all those warnings as errors, so someone should not be able to create executable without resolving this errors, $ gcc helloworld.c -Wall -Werror Helloworld.c:4:8: warning: variable ‘p’ set but not used Hence we will enable “show all warnings” macro “-Wall” during command line, $ gcc helloworld.c -Wall But in case of big programs, we dont know how many actual warnings will be, This actually went ahead to create a.out by showing one warning as above. Helloworld.c:6:4: warning: assignment makes pointer from integer without a cast
Now, lets try to compile this program as it is, Now, let me show how this works with the simple program.Ĭreate a helloworld.c as below, #include Ībove program purposefully creates a warning in which we are trying to set integer number to void pointer. This will show the warnings but will not stop compilation reporting those as errors. save this makefile and recompile the code. remove/delete this completely from that Makefile or Change it to “-wno-error”Ĥ. To identify which Makefile is enabling “Werror”ģ.
#CODERUNNER COMPILE FLAGS CODE#
If you dont have time, and can ignore “warnings” for a while, just search the code as, grep -r Werror * Its always better to resolve those errors if you have time.Ģ. So this error, tells us that there are some “warnings” in the program and those are getting considered as “errors” forcing you to fist fix those errors to proceed with the compilation, so there are following ways to proceed,ġ. If you are compiling some C program or open source package using Makefile which is written by someone else, there are chances you may encounter error as “cc1: all warnings being treated as errors” and you will not be able to compile the program or package.
#CODERUNNER COMPILE FLAGS FOR FREE#
Subscribe Lynxbee YouTube Channel for Free Videos on Embedded, Linux, Android, SEO, Web Development