Search code examples
objective-ciosquickdialog

How do I fix this build error the on QuickDialog project?


I'm planning to use QuickDailog in my project, I cloned the project from github here.

I'm trying to run the samples, but when I build the project I get following error

file:///QuickDialog/quickdialog/QuickDialogTableView.m: 
error: Semantic Issue: Second   argument to 'va_arg' is 
of non-POD type 'QElement *'

This is the code segment that is causing this error.

- (void)reloadCellForElements:(QElement *)firstElement, ... {
    va_list args;
    va_start(args, firstElement);
    NSMutableArray *indexes = [[NSMutableArray alloc] init];
    QElement * element = firstElement;
    while (element != nil) {
        [indexes addObject:[self indexForElement:element]];

        //Below line generates the error
        element = va_arg(args, QElement *);
    }
    [self reloadRowsAtIndexPaths:indexes withRowAnimation:UITableViewRowAnimationNone];

    va_end(args);
}

Any suggestions to fix the error?


Solution

  • How are you calling this method? What objects are you calling? Are you sending a null terminated list of objects?

    I can't reproduce the issue, but googling around I found this:

    http://builderror.com/article/47/Second-argument-to-vaarg-is-of-non-POD-type

    Can you try to use that workaround and see if it solves the issue?