'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
b) they are the return exits of non-returning functions
:return: None'

def _clean_pending_exits(self):

    pending_exits_to_remove = []
    for (i, pe) in enumerate(self._pending_jobs):
        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(i)
    for index in reversed(pending_exits_to_remove):
        job = self._pending_jobs[index]
        self._deregister_analysis_job(job.func_addr, job)
        del self._pending_jobs[index]
