Peter,
I built plpython with scan-build using Python 2.7.12 and Clang 3.8. Onmaster, I got 13 warnings, and with your patches only one warning(report attached).
Make installcheck passes.Let me know if I can test anything else.
-John Naylor