protected AddressSet setNoFallThru(Program program, Address nonReturningFunctionEntry) {
		AddressSet calledLocations = new AddressSet();

		ReferenceIterator refIter =
			program.getReferenceManager().getReferencesTo(nonReturningFunctionEntry);
		while (refIter.hasNext()) {
			Reference ref = refIter.next();
			if (!ref.getReferenceType().isCall()) {
				continue;
			}
			Address fromAddr = ref.getFromAddress();

			Instruction instr = program.getListing().getInstructionAt(fromAddr);
			if (instr == null) {
				continue;
			}
			Address fallthruAddr = instr.getFallThrough();
			if (instr.getFlowOverride() != FlowOverride.CALL_RETURN && fallthruAddr != null) {
				instr.setFlowOverride(FlowOverride.CALL_RETURN);
				// some overriden flows, like conditional call, keep their fallthrough
				//   no need to fix these locations
				if (instr.getFlowType().hasFallthrough()) {
					continue;
				}
				calledLocations.add(instr.getMinAddress());
			}
		}

		return calledLocations;
	}
Sets all locations that call the function at entry to be non-returning.

@param program function is found within
@param nonReturningFunctionEntry function to be made non-returning

@return set of all locations that call the function that was set to non-returning.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/disassembler/CallFixupAnalyzer.java