Thanks for jogging my memory. Indeed, there were a few lessons that could be learned from that one:
1. Code checking tools are an aid, not an oracle. The point is not to silence the warnings but to understand why they are there.
2. When doing something that other devs otherwise familiar with the subject domain may see as unusual or deviating from the norm, that's a good time to add a comment or two in your code.
3. If working downstream, your patches should be limited to whatever non-core modifications are necessary for the thing to build and integrate with your system. Stay the fuck away from anything else, especially core code!
Mine's OpenSuse but I ran an incredibly successful project on Slackware¹ and hold it in high regard.
¹ There is an interesting story of how Slackware got "chosen" for that project. On my way to the very remote project site it transpired that the CDs with the software hadn't actually made it there, so I headed for the airport's news stand and grabbed a few copies (for redundancy) of some foreign language computer magazine which came with a Slackware CD. There are times when improvisation is called for and this was one of them.