I'm going with the knife, because my own daughter (who's 5) has been heavily supervised with knife use in cutting her own food at the dinner table. She knows she can get hurt with an edge, so she's careful.
On a related note, she's handled some replica blank-firing guns of mine (also under heavy supervision) and her comment on how heavy they are made me think about the possibility of how easy it would be for her to drop one of them...
...which brings me to a final point: as far as I see it, both are dangerous but if a child manages to disengage the safety and drop the gun (or worse, pull the trigger "to shoot the bad guys") there is no controlling the damage.
Just my two cents' worth.