[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUI with gcc 4.6.0
From: |
Germán Arias |
Subject: |
Re: GUI with gcc 4.6.0 |
Date: |
Sun, 22 May 2011 17:10:10 -0600 |
On lun, 2011-05-23 at 00:13 +0200, Fred Kiefer wrote:
> On 22.05.2011 01:50, Germán Arias wrote:
> > Compiling GUI with gcc 4.6.0 I get the error:
> >
> > Making all for tool say...
> > Compiling file say.m ...
> > say.m: In function 'main':
> > say.m:17:12: error: defines the variable 'outfile' but not used
> > [-Werror=unused-but-set-variable]
> > cc1obj:
> > all warnings are treated as errors
> >
> > make[5]: *** [obj/say.obj/say.m.o] Error 1
> > make[4]: *** [internal-tool-all_] Error 2
> > make[3]: *** [say.all.tool.variables] Error 2
> > make[2]: *** [internal-all] Error 2
> > make[1]: *** [internal-all] Error 2
> > make: *** [internal-all] Error 2
>
> There are to angles to this problem. One is of course that, as gcc
> reports, we have an unused variable in our code, which we should safely
> remove. The other is that gcc treats warnings as errors and fails
> because of this. I don't think that this is the standard even for gcc
> 4.6. You should find out where this is set and remove that setting.
Well, the variable "outfile" is declared as
NSString *outFile = nil;
and is used inside the loop while. But for some reason (I don't know how
the compiler works) show the previous error. Of course, I can compile
GUI removing the option -Werror in GNUmakefile of tool "say". And I
don't know if this option is really necessary here (I think no).