'Remove those pending exits if:
a) they are the return exits of non-returning SimProcedures
b) they are the return exits of non-returning syscalls
c) they are the return exits of non-returning functions
:return: True if any pending exits are removed, False otherwise
:rtype: bool'

def _clean_pending_exits(self):

    pending_exits_to_remove = []
    for (block_id, pe) in self._pending_jobs.iteritems():
        if (pe.returning_source is None):
            continue
        func = self.kb.functions.function(pe.returning_source)
        if (func is None):
            l.warning('An    expected    function    at    %s    is    not    found.    Please    report    it    to    Fish.', (hex(pe.returning_source) if (pe.returning_source is not None) else 'None'))
            continue
        if (func.returning is False):
            pending_exits_to_remove.append(block_id)
            current_function_addr = self._block_id_current_func_addr(block_id)
            if (current_function_addr is not None):
                current_function = self.kb.functions.function(current_function_addr)
                if (current_function is not None):
                    call_site_addr = self._block_id_addr(pe.src_block_id)
                    current_function._call_sites[call_site_addr] = (func.addr, None)
                else:
                    l.warning('An    expected    function    at    %#x    is    not    found.    Please    report    it    to    Fish.', current_function_addr)
    for block_id in pending_exits_to_remove:
        l.debug('Removing    a    pending    exit    to    %#x    since    the    target    function    %#x    does    not    return', self._block_id_addr(block_id), self._pending_jobs[block_id].returning_source)
        to_remove = self._pending_jobs[block_id]
        self._deregister_analysis_job(to_remove.caller_func_addr, to_remove)
        del self._pending_jobs[block_id]
    if pending_exits_to_remove:
        return True
    return False
