Permalink
Browse files

CBD-103 Pass -Werror to erlc

Change-Id: I56cc7ffa0432965fae1dd2c1669c238b21759f0b
Reviewed-on: http://review.couchbase.org/15428
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Damien Katz <damien@couchbase.com>
  • Loading branch information...
1 parent ef8a866 commit fce4f5c9b1b38c7e49f1fcb17d6499599d461311 @fdmanana fdmanana committed Apr 28, 2012
Showing with 40 additions and 11 deletions.
  1. +37 −8 Makefile.am
  2. +1 −1 configure.ac
  3. +2 −2 src/etap/etap_web.erl
View
@@ -153,22 +153,51 @@ COUCHDB_PLT ?= couchdb.plt
$(COUCHDB_PLT):
$(MAKE) all
- dialyzer --output_plt $(COUCHDB_PLT) --build_plt -pa src/couchdb -pa src/couch_set_view -pa src/mapreduce --apps compiler crypto erts inets kernel os_mon sasl ssl stdlib xmerl syntax_tools public_key snmp tools hipe runtime_tools mnesia -c src/erlang-oauth src/etap src/mochiweb src/snappy
+ dialyzer --output_plt $(COUCHDB_PLT) --build_plt \
+ -pa src/lhttpc \
+ -pa src/couchdb \
+ -pa src/couch_set_view \
+ -pa src/mapreduce \
+ --apps \
+ compiler \
+ crypto \
+ erts \
+ inets \
+ kernel \
+ os_mon \
+ sasl \
+ ssl \
+ stdlib \
+ xmerl \
+ syntax_tools \
+ public_key \
+ snmp \
+ tools \
+ hipe \
+ runtime_tools \
+ mnesia \
+ -r \
+ src/erlang-oauth \
+ src/etap \
+ src/mochiweb \
+ src/snappy
.PHONY: rebuild_plt
rebuild_plt:
- rm $(COUCHDB_PLT)
+ rm -f $(COUCHDB_PLT)
$(MAKE) $(COUCHDB_PLT)
dialyzer: all $(COUCHDB_PLT)
dialyzer --plt $(COUCHDB_PLT) \
+ -Wrace_conditions \
-pa src/couchdb \
- -pa src/couch_set_view/ebin \
+ -pa src/couch_set_view \
-pa src/mapreduce \
-pa src/lhttpc \
-pa src/snappy \
- -c src/couchdb \
- -c src/couch_set_view/ebin \
- -c src/snappy \
- -c src/lhttpc \
- -c src/mapreduce
+ -r \
+ src/couchdb \
+ src/couch_set_view/ebin \
+ src/snappy \
+ src/lhttpc \
+ src/mapreduce
View
@@ -145,7 +145,7 @@ AC_ARG_VAR([FLAGS], [general flags to prepend to LDFLAGS and CPPFLAGS])
ac_test_ERLC_FLAGS=${ERLC_FLAGS+set}
if test "$ac_test_ERLCFLAGS" != set; then
- ERLC_FLAGS=+debug_info
+ ERLC_FLAGS="+debug_info -Werror"
fi
LIB_FLAGS="-L/usr/local/lib -L/opt/local/lib"
View
@@ -42,7 +42,7 @@ simple_404(Url, Desc) ->
%% @doc Create and return a request structure.
build_request(Method, Url, Headers, Body)
when Method==options;Method==get;Method==head;Method==delete;Method==trace ->
- try http:request(Method, {Url, Headers}, [{autoredirect, false}], []) of
+ try httpc:request(Method, {Url, Headers}, [{autoredirect, false}], []) of
{ok, {OutStatus, OutHeaders, OutBody}} ->
etap_request:new(Method, Url, Headers, Body, OutStatus, OutHeaders, OutBody);
_ -> error
@@ -56,7 +56,7 @@ build_request(Method, Url, Headers, Body) when Method == post; Method == put ->
{value, {"Content-Type", X}} -> X;
_ -> []
end,
- try http:request(Method, {Url, Headers, ContentType, Body}, [{autoredirect, false}], []) of
+ try httpc:request(Method, {Url, Headers, ContentType, Body}, [{autoredirect, false}], []) of
{ok, {OutStatus, OutHeaders, OutBody}} ->
etap_request:new(Method, Url, Headers, Body, OutStatus, OutHeaders, OutBody);
_ -> error

0 comments on commit fce4f5c

Please sign in to comment.