Applied fix mentioned in bugreport 3370. Seems to solve the issue.
fixed comparison to stop integer wrap around
Add on optional parameter to the matx invert function to know if this operation is successfull without having to analyse the matrix (it may fail in case of bad preconditioning or inappropriate decomposition method)
Comment correction
fixed compilation with CUDA 6.0:

GpuMat::setTo function, removed NPP call for CV_8S
Ensure compilation to Javascript with Emscripten
fixing build of 2.4 branch with VC12 (aka 2013)
(master branch was fixed before, no need to merge this to master!)
- disable openexr (numerous undefined std::min & std::max)
- workaround for two compilator bugs
Merge pull request #1907 from severin-lemaignan:emscripten-2.4
fix gpu test for Demosaicing:

check that input images was loaded correctly
added additional check in cv::gpu::demosaicing that source is not empty
ocl:perf: fix moments test for plain impl
Added patch from master for fixing VS2013 in 3rd party lib OpenEXR
Fixed the "platfrom" typo everywhere.
fixing compilation on Linux
Merge pull request #1916 from alalek:ocl_moments_fix_perf
Merge pull request #1911 from apavlenko:2.4_fix_vc12
Fixed a -Wundef warning in cl_platform.h.

_MSC_VER -> defined _MSC_VER. Fixes building with MinGW.
Similar to fbc91c5ee.
ocl: try to disable clFinish workaround
Merge pull request #1915 from jet47:gpu-color-test-fix
Merge pull request #1919 from SpecLad:platfrom