0
float latitude = [((IPADAppDelegate *)[UIApplication sharedApplication].delegate).detailViewController.userStoreInfoObj.StoreLatitude floatValue];
float longitude = [((IPADAppDelegate *)[UIApplication sharedApplication].delegate).detailViewController.userStoreInfoObj.StoreLongitude floatValue];
NSString *strAddress = [((IPADAppDelegate *)[UIApplication sharedApplication].delegate).detailViewController.userStoreInfoObj StoreAddress];
NSString *strCountry= [((IPADAppDelegate *)[UIApplication sharedApplication].delegate).detailViewController.userStoreInfoObj StoreCounty];
NSString *strCode = [((IPADAppDelegate *)[UIApplication sharedApplication].delegate).detailViewController.userStoreInfoObj StoreZip];
if(storeData)
{
latitude = [storeInfoObj.StoreLatitude floatValue];
longitude = [storeInfoObj.StoreLongitude floatValue];
strAddress = [storeInfoObj StoreAddress];
strCountry = [storeInfoObj StoreCounty];
strCode = [storeInfoObj StoreZip];
}
초기화 중에 위도에 저장된 값은 읽히지 않습니다.값 초기화 중에 저장 됨
왜 이런 일이 일어 났는지 이해할 수 있습니까?
이 문제를 해결하려면 어떻게해야합니까? 제발 도와주세요 [나는 내 운을 시험해 본다]. 정적 분석기 가능성이 storeData
항상 true로 평가 것을 발견했습니다 :
임무 코드가 있거나 다른 위치가 설정되었거나 storeData가 항상 true입니까? Analyzer를 실행하고 경고를 클릭하면 오류의 원인이되는 실행 경로가 표시됩니다. – zaph
당신이 의미하는 바를 결코 읽을 수 없습니까? 나중에이 변수를 읽으려고 할 때 설정 한 초기 값이 제대로 설정되지 않은 것입니까? – Madhu
@ Madhumal Gunetileke 실제로 응용 프로그램 에서이 경고를 발견 그래서 빌드 및 분석에서 실행중인 응용 프로그램. 그래서 내 프로젝트에 제로 경고와 제로 잠재 누수가있는 응용 프로그램을 원합니다 ... – user891268