views:

1399

answers:

2

I'm getting this warning all over the place in some perfectly well functioning objective-c code within XCode. My google-fu has failed me... others have run into this but I could not find an explanation on what exactly is causing it or how it can be fixed.

+3  A: 

In pure C, the following code:

int;
typedef int;

elicits the following warnings from GCC with no warning options set:

x.c:1: warning: useless keyword or type name in empty declaration
x.c:1: warning: empty declaration
x.c:2: warning: useless keyword or type name in empty declaration
x.c:2: warning: empty declaration

Maybe you have something analogous in your code?

Jonathan Leffler
+1  A: 

Found the problem and fixed it. I had this:

enum eventType { singleTouch };
enum eventType type;

... and changed it to:

enum eventType { singleTouch } type;
Stephen Petschulat