GCC inspired type fixes plus one coverity inspired fix

Another quickie