Niklas Hambüchen | 8 Nov 01:54 2012

Compiling with hsc2hs and -Wextra


when I compile my C binding using hsc2hs with the -Wextra enabled in my
cabal file:

    cc-options: -std=c99 -Wall -Wextra -Werror

This breaks the compilation started by hsc2hs:

    MyHsc.hsc: In function ‘main’:
    MyHsc.hsc:16:15: error: unused parameter ‘argc’
    MyHsc.hsc:16:27: error: unused parameter ‘argv’
    cc1: all warnings being treated as errors
    compiling dist/build/MyHsc_hsc_make.c failed (exit code 1)

I would really like to compile my code with -Wextra -Werror though.

Can't we just (void) argc; (void) argv; the arguments in the generated
code, like described in [1]?