Fix Coverity Static Analysis Warnings in XBMC

This PR fixes up Coverity static analysis warnings in XBMC.