开发者

Load data from sqlite database error. "differ in signedness"

开发者 https://www.devze.com 2023-02-22 20:59 出处:网络
I\'m having trouble loading data from sqlite database into a detailed view. The table displays correctly and when loading detailed view the app crashes and returns开发者_StackOverflow the following wa

I'm having trouble loading data from sqlite database into a detailed view. The table displays correctly and when loading detailed view the app crashes and returns开发者_StackOverflow the following warning;

pointer targets in passing argument 1 of 'stringWithUTF8String:' differ in signedness

What does this mean and how do i fix this. Help please. Here is my code.

if (SQLITE_DONE != sqlite3_step(detailStmt)) {
    const unsigned char *db_text = sqlite3_column_text(detailStmt, 2);
    NSString *address = [NSString stringWithUTF8String: db_text]; //error here!
    self.ClubAddress = address;
}
else
    NSAssert1(0, @"Error while getting the address of club. '%s'", sqlite3_errmsg(database));
sqlite3_reset(detailStmt);

isDetailViewHydrated = YES;
}


You are passing in an unsigned char * when stringWithUTF8String: expects a char * -- may want to drop the unsigned modifier on line 2 of your snippet.

0

精彩评论

暂无评论...
验证码 换一张
取 消