VHDL - Subtype or type has null range
The range: N - 1 downto X is evaluating to a range with 0 or negative size.
Consider the range: 0 downto 4, it has a size that is less than 0 since the number before the downto is less than the number after it.

The problem here is using a range that has a size less than 1 makes it a null range which has some valid uses in vhdl. However, since this is potentially a range error Quartus gives the warning you are seeing here.