Silence a few clang warnings. More to come.
(cherry picked from commit 7373bb5bfd9c3c01cba07d90a8fd1617949758a9)
Enable gcc -Wold-style-declaration and fix issues
(cherry picked from commit 1631e3a5fb692f9a83b12944fc5358905c30b065)
Store fread result in variable with correct type - size_t
(cherry picked from commit ee49ae3abc5eb3c7212030aeb6c8732def4878cf)
Allow compilation with non-ASCII chars in the path

The problem was that we put the absolute path into darktableconfig.xml
to find the DTD. This however failed when there were some special
characters in the path. Now we just copy darktableconfig.dtd to build.
(cherry picked from commit 91ed74387d81eb600d52254ff0dd6bf744eddbab)
Fix bug #9874 where MRWs showed in purple
As it turns out the 270cw rotation was wrong. Made the code more explicit as to what it is doing with the three flip bits.
(cherry picked from commit 67483234b2864969495636f685fd5f9d42172437)
Clang: enable -Werror and fix code

(cherry picked from commit 4f50848d99e76900f29ed8e1da55edab2e632b7b)

Conflicts:
	src/CMakeLists.txt
	src/views/slideshow.c
No need for strlen here

(cherry picked from commit b6e851317bf4eea572ed6491422a67d9d2a1e873)
Do not compare array against 0
Coverity CID 1111070, CID 1034348, CID 1034347, CID 1034345

(cherry picked from commit cd9d547f25e7b448e7a5f7897918f0c48b4b2e0a)
pfm: repair pfm reading broken in ee49ae3

(cherry picked from commit ae49842f3a77d8c836b50571e9794ebd94f9ad5b)
Fix some potential negative array index reads/writes
Coverity CID 1034351, CID 1034353, CID 1034354, CID 1034352, CID 1034355, CID 1034356

(cherry picked from commit ca15484c63cfb20f1e049518d6f3d7c3b74203cf)
Fix potential negative array index read
Coverity CID 1034502

(cherry picked from commit 746440a082373240ddb2a4e70e82551e7afe1ebb)
EXPERIMENTAL Fix for potential memory corruption in zonesystem
Coverity CID 1034335

(cherry picked from commit 6754d3d7f8b2d6fee138cad372527b08a7e22658)
Fix segfault due to buffer overflow in darktablerc read code
One could cause this by placing line like opencl_device_priority=`perl -e 'print "A"x5000'`

(cherry picked from commit 459ad5cdd0b8442816c4003107fd0cf47df3aacd)
Fix another segfault due to buffer overflow in data/kernels/programs.conf read code
One could cause this by placing line like `perl -e 'print "A"x5000'` in programs.conf

(cherry picked from commit 581670657ff7abef0a5c7f4741f9903a3274c00e)
Experimental fix for potential Negative array index read in gradiend slider
Coverity CID 1034359

(cherry picked from commit 5e57fafa0d78d74f89b3515c2250c3a77321bcba)
Fix potential out-of-bounds write
However, configstr can not be longer than ~700 chars (see src/control/conf.h, function dt_conf_init), so overflow is unlikely
Coverity CID 1034339

(cherry picked from commit f746cb79a721679d0920b1624c829cf4f7ac7d07)
Better fix for gradient slider. This replaces 5e57fafa0d78
Coverity CID 1034359

(cherry picked from commit 26c3204dd21fda921c678e118ed90fa94f7d80a3)
Fix multiple (potential?) memleaks in masks. Anything broken?
Coverity CID 1125109, CID 1125110, CID 1147481, CID 1147482, CID 1147483, CID 1147484, CID 1147485, CID 1147486, CID 1147487, CID 1147488, CID 1147489

(cherry picked from commit b5cf6c950513f8b467153562f09d71633bc02d92)
Some more sizeof
(cherry picked from commit 9eaf352f1adec8a1916b04d3030799a84c3f116f)

Conflicts:
	src/views/view.c
blending: fix clamping in blend mode coloradjustment

this should fix #9882
(cherry picked from commit b822d57911a88a6048a3b2636f90c376ff3b714e)