Disable warnings being treated as errors (cc1.exe)
Asked Answered
L

2

26

I am developing a BREW application. When compiling the application to get a MOD file, I am continuously getting this error:

cc1.exe: warnings being treated as errors

I want to disable this warning. I have googled it, and many say disabling -werror will help, but how can I do that?

The compiler is CodeSourcery ARM.

Languorous answered 20/4, 2012 at 14:42 Comment(0)
E
38

You need to remove -Werror from CFLAGS, CPPFLAGS etc.; these are usually set in Makefile's or build scripts.

However, I'd strongly advice to fix the actual warnings instead, which will produce more stable and error-free code.

Eruption answered 20/4, 2012 at 14:51 Comment(2)
Is there a way i could exclude only one file from this in the linux build systemDermis
In my particular case I needed to remove -Werror-implicit-function-declaration. Totally agree with your advice, but sometimes you just want to compile someone else's code, which used to compile under older versions of gcc and there are simply too many of these warnings to fix in a reasonable time.Synesthesia
M
3

Run this Command in Terminal to say, not to consider warning as error

make CFLAGS="-Wno-error=format-truncation"
Minstrel answered 30/11, 2020 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.