private void setFunctionNonReturning(Program cp, Address entry) {
		Function func = cp.getFunctionManager().getFunctionAt(entry);
		if (func == null) {
			CreateFunctionCmd createFunctionCmd = new CreateFunctionCmd(entry);
			createFunctionCmd.applyTo(cp);
			func = cp.getFunctionManager().getFunctionAt(entry);
			if (func == null) {
				return;
			}
		}
		// if func is null, create one at entry
		func.setNoReturn(true);
	}
Set function to non-returning

@param cp program
@param entry function entry to change to non-returning
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/FindNoReturnFunctionsAnalyzer.java