Fix miscellaneous warnings from compiling with MinGW.

These warnings: http://build.opencv.org/builders/win_x64%5Brelease%5D--%5Bsse_%3D_ON%5D--%5Btbb_%3D_OFF%5D--%5Bgpu_%3D_OFF%5D--%5Bcompiler_%3D_mingw%5D--%5Btests_%3D_ON%5D-/builds/1080/steps/compile%20release%2064%20mingw%20shared%20n/logs/stdio