summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--src/credit_flow.erl6
-rw-r--r--src/rabbit_table.erl9
3 files changed, 10 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 546d30cf1a..280d61a577 100644
--- a/Makefile
+++ b/Makefile
@@ -42,7 +42,7 @@ USE_PROPER_QC:=$(shell erl -noshell -eval 'io:format({module, proper} =:= code:e
endif
#other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests
-ERLC_OPTS=-I $(INCLUDE_DIR) -Wall -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc)
+ERLC_OPTS=-I $(INCLUDE_DIR) -Wall +warn_export_vars -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc)
ifdef INSTRUMENT_FOR_QC
ERLC_OPTS += -DINSTR_MOD=gm_qc
diff --git a/src/credit_flow.erl b/src/credit_flow.erl
index edf9805c53..345055a361 100644
--- a/src/credit_flow.erl
+++ b/src/credit_flow.erl
@@ -74,9 +74,9 @@
%% We deliberately allow Var to escape from the case here
%% to be used in Expr. Any temporary var we introduced
%% would also escape, and might conflict.
- case get(Key) of
- undefined -> Var = Default;
- Var -> ok
+ Var = case get(Key) of
+ undefined -> Default;
+ V -> V
end,
put(Key, Expr)
end).
diff --git a/src/rabbit_table.erl b/src/rabbit_table.erl
index e716345b85..a873a714e1 100644
--- a/src/rabbit_table.erl
+++ b/src/rabbit_table.erl
@@ -189,9 +189,12 @@ check_content(Tab, TabDef) ->
check(Fun) ->
case [Error || {Tab, TabDef} <- definitions(),
- case Fun(Tab, TabDef) of
- ok -> Error = none, false;
- {error, Error} -> true
+ begin
+ {Ret, Error} = case Fun(Tab, TabDef) of
+ ok -> {false, none};
+ {error, E} -> {true, E}
+ end,
+ Ret
end] of
[] -> ok;
Errors -> {error, Errors}