Add compiler warning flags to CMakeLists.txt.

This commit adds a conditional check for the compiler and adds
appropriate warning flags for it.
Remove unnecessary parameters from main().

leodb does not currently use command line arguments, and having unused
parameters was triggering a warning with GCCs -Wextra flag.