Removing warning FF/Latch trimming
The one sure way to eliminate those warnings is to not generate the extraneous latches/FFs in the first place, by sizing your buses appropriately. Unfortunately, this is often at odds with other system-level goals, such as modular design and "standardized" interfaces. So, most of us just live with the warnings.

In some specific cases, it is possible to eliminate the latches without too much hassle. For example, in your specific instance, it would seem your assignment statement is inside a clocked process, which is why it creates latches in the first place. You could split it into two separate statements, with only the 4 LSBs assigned inside the process, and the 12 MSBs assigned outside the process.

I agree, this makes the source code messier and harder to follow, and it may not even eliminate the problem altogether &mdash; very often, it just pops up somewhere else. It's almost impossible to eliminate all such warnings, so going to extreme lengths to get rid of some of them just isn't worth it.