Fix various warnings in the RTS
Previously Hadrian's +werror
flavour transformer only passed -Werror
to GHC itself, which would not ensure that the same was passed to the C compiler for C compilations. Fix this and the various warnings that this turned up. This includes one rather egregious memory leak in ProfilerReportJson.c
.