On Jul 7, 2010, at 10:27 AM, Greg Guerin wrote: > vincent habchi wrote: > >> That's true, the compiler cannot guarantee that dim > 1, which is always the >> case actually. >> I am going to put an extra text at the beginning of the method, like: "if >> (dim < 1) return;" and see what happens. > > If you need to guarantee dim > 1, then your if statement should be: > if (dim <= 1) return
Also, you can use an assertion, even a custom assertion <http://clang-analyzer.llvm.org/annotations.html#custom_assertions>, and the analyzer will recognize it as truncating that particular code path. Cheers, Ken _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
