Fix various compiler warnings with the 64bit mingw build

Merged Christoph Reiter requested to merge creiter/gtk:mingw-x64-compiler-warnings into master

Use better matching format modifiers/specifiers, initialise some things which in theory wont be written to because of getters using g_return_if_fail(), a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.

This depends on !2019 (merged) to pass CI

Merge request reports