Ticket #3505 warning and build cleanup for ubuntu