adium/adium

8d9afb2f8f49
Parents cc5903df1cbc
Children 61c90f48b221
Add an int cast when bounds checking some enums.
--- a/Source/AIStatusController.m Sat Jul 13 12:01:17 2013 -0400
+++ b/Source/AIStatusController.m Sat Jul 13 12:17:18 2013 -0400
@@ -235,7 +235,7 @@
NSString *serviceCodeUniqueID = service.serviceCodeUniqueID;
AIStatusType type;
- for (type = AIAvailableStatusType ; type < STATUS_TYPES_COUNT ; type++) {
+ for (type = AIAvailableStatusType ; (int)type < STATUS_TYPES_COUNT ; type++) {
NSArray *menuItemArray;
menuItemArray = [self _menuItemsForStatusesOfType:type
--- a/Source/AdiumContentFiltering.m Sat Jul 13 12:01:17 2013 -0400
+++ b/Source/AdiumContentFiltering.m Sat Jul 13 12:17:18 2013 -0400
@@ -48,7 +48,7 @@
direction:(AIFilterDirection)direction
{
NSParameterAssert(type >= 0 && type < FILTER_TYPE_COUNT);
- NSParameterAssert(direction >= 0 && direction < FILTER_DIRECTION_COUNT);
+ NSParameterAssert(direction >= 0 && (int)direction < FILTER_DIRECTION_COUNT);
if (!contentFilter[type][direction]) {
contentFilter[type][direction] = [[NSMutableArray alloc] init];
@@ -81,7 +81,7 @@
direction:(AIFilterDirection)direction
{
NSParameterAssert(type >= 0 && type < FILTER_TYPE_COUNT);
- NSParameterAssert(direction >= 0 && direction < FILTER_DIRECTION_COUNT);
+ NSParameterAssert(direction >= 0 && (int)direction < FILTER_DIRECTION_COUNT);
if (!contentFilter[type][direction]) {
contentFilter[type][direction] = [[NSMutableArray alloc] init];
@@ -290,7 +290,7 @@
context:(id)context
{
NSParameterAssert(type >= 0 && type < FILTER_TYPE_COUNT);
- NSParameterAssert(direction >= 0 && direction < FILTER_DIRECTION_COUNT);
+ NSParameterAssert(direction >= 0 && (int)direction < FILTER_DIRECTION_COUNT);
BOOL shouldDelay = NO;
NSInvocation *invocation;