Hi,

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’
[-Werror=unused-parameter]
    MyHsc.hsc:16:27: error: unused parameter ‘argv’
[-Werror=unused-parameter]
    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]?

Thanks
Niklas


[1]
http://stackoverflow.com/questions/3599160/unused-parameter-warnings-in-c-code

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to