Par 1) (Beg of Parsha,Deut 21:10): "If you go out to war and the L-rd, your G-d, will deliver etc." going out of doubt and through this - "and you take his captives"
Par 2) The reason that we make a blessing on a Maaka (guard-rail) (even though we do not make a blessing on a Mitzvah that is due to danger) because "so that you shall not cause blood [to be spilled] in your house" is a secondary aspect