Alex Rivera | Logout

C warning Missing sentinel in function call

Asked 2010-03-09T08:40:52.717
51

This is my warning.

Missing sentinel in function call

How i can remove it.

i am using linux & gcc compiler.

Edit
Report

1 Answer

-2

I finally found a way to get rid of this strange and annoying warning.

All you need to do is to cast a nil pointer to an appropriate pointer type.

In case of UIAlertView it goes like this:

UIAlertView* alert = [ [ UIAlertView alloc ] initWithTitle: @"Title" message: @"Message" delegate: nil cancelButtonTitle: @"Cancel" otherButtonTitles: @"OK", ( NSString* )nil ];

Notice the ( NSString* )nil cast.

Have a try and let me know if this works for you.

answered 2012-09-24T07:22:19.727

Your Answer