removing more warnings
fixed a bad cast in trying to remove warnings
adding casts to segmeent to reduce warnings
Merge branch 'feature/issue-682-remove-warnings-v2.3.0' of https://github.com/stan-dev/stan into feature/issue-682-remove-warnings-v2.3.0
removed more warnings
Merge pull request #689 from stan-dev/feature/issue-682-remove-warnings-v2.3.0

Fixes #682. Feature/issue 682 remove warnings v2.3.0