I had some time and wanted to see how mutt compiles with more warnings enabled, i.e. CFLAGS='-Wall -Wcast-qual -Werror -Wimplicit-function-declaration -Wimplicit-int -Wnull-dereference -Wold-style-definition -Wredundant-decls -Wstrict-prototypes -Wstring-compare -Wtype-limits -Wuninitialized -Wunused'
Turns out there's a lot the compiler complains about, especially when it comes to some const usage. The following patches are a result of this experiment and are far from a complete fix. This series depends on the proposed reformatting from Kevin. It's untested besides compilation and CI.
