fixes compiler warnings

* converts some `int` to `ssize_t`
* adds `const` to `title()` and `subtitle()`
Merge pull request #4563 from ricardoquesada/compiler_warning_fixes

fixes compiler warnings