The code itself might not be legal, but applying code to the game, so long as it doesn't borrow from the original source, is not.
Court battles involving unlicensed games typically go toward the unlicensed software, except in cases where the unlicensed software claims it is licensed, and when the content is made illegal. Regardless, the end-user is not held legally accountable.
Voiding a warranty is a much different issue than legality. Warranties expire, regardless, so it's not a fear I currently have.
As far as bricks go, homebrew content isn't the only thing causing bricks... Nintendo's 4.2 update caused several! As have several PS3 updates. The 360 has more than it's share of issues, regardless. I can't speak about iPhones and bricks, I don't know anything about that. Do you get upset when people open up their PS2 to clean the lens because it's dusty and can't play games any more? That voids the warranty, but doesn't do anything illegal. How do you feel about Game Genie, GameShark, and Pro Action Replay? In some cases, those devices void warranties, and even allow homebrew content to be played. Don't like 'em? Courts have deemed them as legal time and time again.
So, I suppose what I'm saying is that what I'm saying isn't as dubious as you claim, at least according to US precedent. Why do you believe they aren't legal? Additionally, a patch applied to a read-only game, that can't possibly be written to, could not void the warranty. Why? There's no possible way for the Wii to write to the disc. It doesn't do that. It can't. Additionally, if by some reason it could void the warranty, it would be absolutely undetectable that something like that was used on the game disc, too.