没有强制转换错误的整数指针

时间:2013-01-10 18:18:33

标签: iphone xcode pointers theos

有人可以帮我解决这个错误吗?我已经在我正在进行的另一个调整中使用了这个并且获得intValue没有问题,但由于某种原因它现在是,我正在通过theos创建一个WeeAppPlugin

typedef enum {
    appleSMS = 0,
    biteSMSClient = 1
} WSSMSClient;

typedef enum {
    appleTwitter = 0,
    twitkaflyClient = 1
} WSTwitterClient;

static WSSMSClient *smsClient;
static WSTwitterClient *twitterClient;

- (void)loadSettings {
    [_settings release];
    _settings = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.michaelpoole.weesocial.plist"];
    smsClient = [[_settings objectForKey:@"smsClient"] intValue];
    twitterClient = [[_settings objectForKey:@"twitterClient"] intValue];
}

错误是

WeeSocialController.m:213: warning: assignment makes pointer from integer without a cast
WeeSocialController.m:214: warning: assignment makes pointer from integer without a cast

1 个答案:

答案 0 :(得分:1)

使用这种方式,无需指向枚举

static WSSMSClient smsClient;
static WSTwitterClient twitterClient;