make build warnings consistent

This commit is contained in:
Simon Michael 2014-10-18 09:59:11 -07:00
parent 6a23ea87cc
commit 84a90374b4
4 changed files with 28 additions and 12 deletions

View File

@ -105,7 +105,14 @@ PATCHLEVEL:=$(shell git describe --long | awk -F - '{print $$2}')
#PATCHLEVEL:=$(shell git rev-list last_release..HEAD | wc -l) #PATCHLEVEL:=$(shell git rev-list last_release..HEAD | wc -l)
# build flags # build flags
WARNINGS:=-W -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction # comment the below to see more warnings
WARNINGS:=\
-Wall \
-fno-warn-unused-do-bind \
-fno-warn-name-shadowing \
-fno-warn-missing-signatures \
-fno-warn-orphans \
-fno-warn-type-defaults \
# For ghc-only dev builds of hledger-web: enable the language # For ghc-only dev builds of hledger-web: enable the language
# extensions specified in hledger-web.cabal, except for some which are # extensions specified in hledger-web.cabal, except for some which are

View File

@ -33,6 +33,8 @@ extra-source-files:
library library
-- should set patchlevel here as in Makefile -- should set patchlevel here as in Makefile
cpp-options: -DPATCHLEVEL=0 cpp-options: -DPATCHLEVEL=0
ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
default-language: Haskell2010 default-language: Haskell2010
exposed-modules: exposed-modules:
Hledger Hledger
@ -97,7 +99,8 @@ source-repository head
test-suite tests test-suite tests
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: tests/suite.hs main-is: tests/suite.hs
ghc-options: -Wall ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
default-language: Haskell2010 default-language: Haskell2010
build-depends: hledger-lib build-depends: hledger-lib
, base >= 4.3 && < 5 , base >= 4.3 && < 5

View File

@ -82,7 +82,8 @@ library
if flag(dev) || flag(library-only) if flag(dev) || flag(library-only)
cpp-options: -DDEVELOPMENT cpp-options: -DDEVELOPMENT
ghc-options: -Wall -fno-warn-unused-do-bind ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
extensions: extensions:
CPP CPP
@ -186,11 +187,12 @@ executable hledger-web
cpp-options: -DVERSION="0.23.98" cpp-options: -DVERSION="0.23.98"
if flag(dev) if flag(dev)
cpp-options: -DDEVELOPMENT cpp-options: -DDEVELOPMENT
ghc-options: -Wall -fno-warn-unused-do-bind ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
if flag(threaded) if flag(threaded)
ghc-options: -threaded ghc-options: -threaded
if flag(dev) if flag(dev)
ghc-options: -O0 ghc-options: -O0
@ -278,7 +280,8 @@ executable hledger-web
test-suite test test-suite test
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
ghc-options: -Wall ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
hs-source-dirs: tests hs-source-dirs: tests
main-is: main.hs main-is: main.hs
build-depends: build-depends:

View File

@ -42,8 +42,9 @@ flag threaded
Default: True Default: True
library library
cpp-options: -DVERSION="0.23.98" cpp-options: -DVERSION="0.23.98"
ghc-options: -W ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
default-language: Haskell2010 default-language: Haskell2010
-- should be the same as below -- should be the same as below
exposed-modules: exposed-modules:
@ -129,8 +130,9 @@ executable hledger
Hledger.Cli.Print Hledger.Cli.Print
Hledger.Cli.Register Hledger.Cli.Register
Hledger.Cli.Stats Hledger.Cli.Stats
cpp-options: -DVERSION="0.23.98" cpp-options: -DVERSION="0.23.98"
ghc-options: -W ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
if flag(threaded) if flag(threaded)
ghc-options: -threaded ghc-options: -threaded
-- should be the same as above -- should be the same as above
@ -167,7 +169,8 @@ executable hledger
test-suite tests test-suite tests
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: tests/suite.hs main-is: tests/suite.hs
ghc-options: -Wall ghc-options: -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures
ghc-options: -fno-warn-type-defaults -fno-warn-orphans
default-language: Haskell2010 default-language: Haskell2010
build-depends: hledger-lib build-depends: hledger-lib
, hledger , hledger