discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applications that fail to build with new gnustep from svn


From: Riccardo Mottola
Subject: Re: applications that fail to build with new gnustep from svn
Date: Wed, 06 Apr 2011 15:58:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110402 Icedove/3.1.9

Hi
./PRCustTraceEdges.h:21:127: warning: declaration of 'enum
medianForms' will
not be visible outside of this function
Valid warning.  Enums should be declared before they are used.  If the enum 
declaration happens after its first use, then it is treated as a different 
type, so a correct compiler will reject the two as being different types.

You may be able to turn this off by adding -std=c89, which relaxes this 
restriction slightly.

It was actually a problem of header includes. The header with the definition was not imported in the header but only in the .m file. This is one of the things were I dislike C and especially gcc. At the first use it was declared (I dislike that in C). So the header had an empty declaration and the class file the real one, they should at least clash (that's gcc I suppose).

PRCustTraceEdges.m:86:23: warning: unused variable 'destBytesPerRow' [-
Wunused-variable]
     int               destBytesPerRow;
                       ^
Not an important, just an artefact of the fact that C89 doesn't make it easy to 
respect the principle of least possible scope, so these are often missed.

That's a valid warning I'd say. I left it in to remember me of some future use :) I don't think it can be considered harmful and any decent compiler will not waste allocating such variable I hope.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]