Merge pull request #2777 from rubenk/fix-truncation-warnings