函数“setWeight”的隐式解体

时间:2015-10-22 06:40:12

标签: c cbmc

我正在编写程序,但收到此警告!!在这方面有人可以帮助我。

for(PHAsset *asset in self.assets) {
        NSLog(@"started requesting image %i", i);
        [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeAspectFit options:[self imageRequestOptions] resultHandler:^(UIImage *image, NSDictionary *info) {
            dispatch_async(dispatch_get_main_queue(), ^{
                assetCount++;
                NSError *error = [info objectForKey:PHImageErrorKey];
                if (error) NSLog(@"Image request error: %@",error);
                else {
                    NSString *imagePath = [appDelegate.docsPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%i.png",i]];
                    NSData *imageData = UIImagePNGRepresentation(image);
                    if(imageData) {
                        [imageData writeToFile:imagePath atomically:YES];
                        [self.imagesArray addObject:imagePath];
                    }
                    else {
                        NSLog(@"Couldn't write image data to file.");
                    }
                    [self checkAddComplete];
                    NSLog(@"finished requesting image %i", i);
                }
            });
        }];
    i++;
}
  
    

我理解当编译器在使用函数之前没有看到声明时会出现此警告。但我已经声明了setWeight函数,看起来类型太匹配了。请帮助我,我从昨晚开始就被困在这里。感谢

  

1 个答案:

答案 0 :(得分:1)

你的功能需要bitvector - bitvector setWeight( bitvector node)

但得到了bitvector [] -

bitvector nodes[N] = {...};

...

[edgePos].edgeWeight = setWeight(nodes);