avoiding "expression result unused" warning in a block
The following code is returning an expression unused warning on the assignment operation in the block. The code isn't very practical, but there is a lot more code in the excluded section and that code has to run on a particular queue. 

    __block NSNumber *pageId=nil;
    dispatch_sync(_myDispatchQueue, ^{
        int val;
        //... code generates an int and puts it in val
        pageId = [NSNumber numberWithInt:val];
    }];
    //pageId used below

How do I get rid of this error?

avoiding "expression result unused" warning in a block
===

The following code is returning an expression unused warning on the assignment operation in the block. The code isn't very practical, but there is a lot more code in the excluded section and that code has to run on a particular queue. 

    __block NSNumber *pageId=nil;
    dispatch_sync(_myDispatchQueue, ^{
        int val;
        //... code generates an int and puts it in val
        pageId = [NSNumber numberWithInt:val];
    }];
    //pageId used below

How do I get rid of this error?
