Fix various warnings. The core, the scripts and the tools now compile without warnings with -Wall -Wextra -pedantic.

-Fix warnings from -Woverflow on implicit constant conversion.
-Fix warnings from -pedantic.
-Fix warnings from -pedantic.
-Fix warnings from -Wformat.

Two minor changes in addition :

-Replace a defined value equal to 2^31 - 1 by std::numeric_limits<int>::max().
-Remove useless null-check on pointer returned by new. New doesn't returns nullptr on failure, it throws std::bad_alloc.
Remove changes in dep file.
Merge pull request #12071 from Praetonus/warnings

Fix various warnings.