Machine guns were commonly used in an indirect fire role during the First World War, as the parabolic trajectory allowed machine gunners to target soldiers in trenches.
Now I assume most people aren't using firearms chambered in .303 or another full-size rifle cartridge, but there's obviously various combinations of calibre + azimuth where shooting into the air is dangerous.