Saturday, April 18, 2009

Enable -Wformat for better compile time help

Let the compiler do all the hard work, and be sure to enable the following warning:

Picture 1.png

It does more than just validate printf/scanf formatting calls, which is helpful in itself. It also validates that a sentinel is present in variadic functions. A sentinel is typically NULL or nil for the last parameter. A common place you would benefit from this is using the arrayWithObjects method of NSArray, that requires a nil for the last value.

NSArray *items = [NSArray arrayWithObjects:@"one", @"two", nil];

If the nil is absent, you're receive the following:

Picture 3.png

19 comments:

Anonymous said...

hello ! when C64 for iphone is coming soon ?
thanks for your answer and good work.

Anonymous said...

hello ! when C64 for iphone is coming soon ?
thanks for your answer and good work.

DnP said...

Where are U? Any progress with C64?

Stuart said...

Still here - I'll have an update soon! My lips are bound for 'contractual' reasons...if you know what I mean.

DnP said...

Ohh :) Something Big will be happened?
Pls just a little info, we'll keep it in secret :)

What does soon mean for U? Days, Weeks, a whole month or more?

DnP said...

And when will you tell us something about it?

Stuart said...

As soon as we can go public with information, you'll get some info. If you like, go to my company's web site, Manomio. Perhaps that will give you an idea of how serious we are :)

Stuart said...

@DnP, we're expecting any week now (< 1 month) :)

DnP said...

Time is ticking away :)

Please please just a litle peace of info!

Stuart said...

Something might have been submitted :-)

DnP said...

there is nothing... :(

Stuart said...
This comment has been removed by the author.
Stuart said...

Revisit manomio - it's there now. Video and reviews will be forthcoming!

DnP said...

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

big big THX!

DnP said...

I can't see it in my hungarian store... :(

Stuart said...

@DnP, unfortunately, if you read our release a little more - Apple has initially rejected it... Stay tuned as there is more to come, but we are so close!

DnP said...

"but still not approved by Apple"
ok.. :(

Og2t said...

What's the font you are using for coding? I mean this thin super pixel one? Cheers!

Stuart said...

@Og2t,

I'm using Envy Code R. Highly recommended!