tileset_setup_unit_direction() expects unit_activity_name(ACTIVITY_LAST) to be valid string
Even when called with ACTIVITY_LAST, tileset_setup_unit_direction() does:
Though it's not possible to end there with such illegal activity, heuristics of a bit older gcc (seen on Ubuntu Focal) fail to find that out, and give a warning.
Even when called with ACTIVITY_LAST, tileset_setup_unit_direction() does:
dir_get_tileset_name(loaddir));