I always knew it as:
Oh, McCardy [McCarthy?] is dead and McGinny [McGuinness?] don't know it
McGinny is dead and McCardy don't know it;
The both of 'em dead in the very same bed,
And neither one knows that the other is dead.
I have occasionally wondered about the relationship between the two. Were they friends or enemies?