One of the best known examples of Dark Humor that I can think of on the spot was the line from the first Harry Potter film:
Hermione: I'm going to bed before either of you get us killed or worse... expelled
Ron: (To Harry) She needs to get her priorities straight.
Another real life example would be Saint Lawrence of Rome, an early Christian Martyr who is believed to have been executed for his faith by being grilled alive. During the process of his execution, he yelled at his executioner "Turn me over, I'm done on this side!" For this, Saint Lawrence became the patron Saint of, among other things, "Cooks, Chefs, and Comedians". The last one was certainly deserved without the line as Saint Lawrence was famous in his day for his collection of Joke Books that he would read from to any and all dinner guests (apparently, they he favored the Dad Jokes) so clearly he died as he lived, telling groan inducing jokes. The other two patrons... yeah, that's dark on the churches part.
Your first example is not a joke at all, just an ovservation and will fall flat without some serious work. Your second one, maybe, but it's more of setting the situation. For example, if it's an episode of CSI: Miami and Horatio Cane is rolling up to the scene of a dead video gamer and the coroner learns that COD was "a gunshot wound severing the Superficial Femorial Artery just above the Poplitical artery, causing bleed out. She was dead in minutes, poor baby". Cane stands and begins to take out his sunglasses.
"So what you're saying is he used to be an adventurer," Cane puts his glasses on, "Before he took a bullet to the Knee."
Sorry... Sorry... couldn't resist.
Here it's funny because it's summing up a very grim situation, in a very funny way. The joke isn't inappropriate in the sense that it's an offensive joke or covers offensive materials. It's offense comes from the dis-congruity of a CSI summing up a murder in such a fashion. The TV show didn't help by cutting to the theme song, The Who's "Won't Get Fooled Again" which starts with a loud drawn out shouting of "Yeah", making it seem that Cane quipped solely for the amusement of some DudeBro watching just off screen and following Cane everywhere. In fact, it was mostly the drawn out scream that generated the humor because of how inappropriate it seemed. All the CSI's did this. Back when CSI was just one show, Grissom (Cane's equivalent in that show) was almost exclusively the character to get this because his character was quirky and went to show that he dealt with situations with an off color humor. The jokes most got minor cracks of laughter but weren't as outrageous as Canes appeared to be.
One of the most beloved villains on Buffy the Vampire Slayer was the Mayor, who was hinted at in Season 2 as being someone the towns folk in on his scheme feared, but only appeared on camera in Season 3... and had a public persona that was so squeaky clean, he was practically a living breathing sitcom dad, full of platitudes and pleasantness... so we get to see his office where he is in private. He's talking about his plans and opens a book case to a collection of nasty pentagrams, skulls, candles, and other occult looking things. He reaches in and pulls out... a sanitary wipe and proceeds to clean his hands because he's also a germophobe of the highest order. This character was as chipper and sunny in private (where he was also perfectly willing to discuss all manor of black magic practices) as he was in public. The character is Black Comedy incarnate because he can be so lovable and so evil in the same scene. Buffy did have a lot of dark humor, but the Mayor was the cherry on top.