Minor modifications to avoid several compilation warnings (thanks -pedantic)