Fix misc compilation warnings

In this PR, we fix:
- some warnings raised by `-pedantic` (`extra ';'`)
- some warnings raised by `-Wunused-local-typedefs`