I don't know the function AEViewCreateGradientImage but I'll bet the second parameter takes an int instead of a NSUInteger. NSUInteger is typedefed to an unsigned long so that's why you get the warning. Pass an int instead of an NSUInteger and your warning will go away. You can probably pass an into to your method instead of an NSUInteger.
Edit
I took a look at Apples sample code and I'll expand on what your seeing. Basically it's because when the sample code was written an NSUInteger was likely typedefed to an unsigned int so they didn't get warnings. XCode 5.1 has moved forward and now it's typedefed to an unsigned long. I don't want to reinvent the wheel here and there are lots of stack overflow posts on this such as this one When to use NSInteger vs. int