boredzo / iso-8601-date-formatter

A Cocoa NSFormatter subclass to convert dates to and from ISO-8601-formatted strings. Supports calendar, week, and ordinal formats.
http://boredzo.org/iso8601dateformatter/
Other
600 stars 140 forks source link

Fix issue with format string specifying long but taking an unsigned integer #2

Closed danielctull closed 12 years ago

danielctull commented 12 years ago

This is causing a warning in Xcode 4.4

boredzo commented 12 years ago

This patch does not fix the warning. It currently occurs on 32-bit OS X; this makes it occur on 64-bit OS X instead.

The correct format sequence is %lu, with an explicit cast to unsigned long to cover the size difference when there is one. I'll make that change myself.