[commit: hsc2hs] master: Fix type signature of main test function (fe2de68)
git at git.haskell.org
git at git.haskell.org
Fri Nov 4 21:26:57 UTC 2016
Repository : ssh://git@git.haskell.org/hsc2hs
On branch : master
Link : http://git.haskell.org/hsc2hs.git/commitdiff/fe2de68c064cf6215b5077740d33cb2a67920b14
>---------------------------------------------------------------
commit fe2de68c064cf6215b5077740d33cb2a67920b14
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date: Sat Nov 5 08:19:36 2016 +1100
Fix type signature of main test function
During C compiler feature testing, the `main` function was defined
with a parameter list of `(int argc, char *argv [])` but these
parameters were not used. This results in compiler warnings when
the generated file is compiled with the `-Wextra` warning flag
added to the `cc-options` of the cabal file.
Reviewers: hvr, RyanGlScott, bgamari, rwbarton
Reviewed By: rwbarton
Differential Revision: https://phabricator.haskell.org/D2677
>---------------------------------------------------------------
fe2de68c064cf6215b5077740d33cb2a67920b14
DirectCodegen.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/DirectCodegen.hs b/DirectCodegen.hs
index 37564ee..2a88784 100644
--- a/DirectCodegen.hs
+++ b/DirectCodegen.hs
@@ -63,7 +63,7 @@ outputDirect config outName outDir outBase name toks = do
outTemplateHeaderCProg (cTemplate config)++
concatMap outFlagHeaderCProg flags++
concatMap outHeaderCProg specials++
- "\nint main (int argc, char *argv [])\n{\n"++
+ "\nint main (void)\n{\n"++
outHeaderHs flags (if needsH then Just outHName else Nothing) specials++
outHsLine (SourcePos name 0)++
concatMap outTokenHs toks++
More information about the ghc-commits
mailing list