Browse Source

Fix bug spotted by dialyzer.

Andreas Stenius 10 years ago
parent
commit
ffb6abd82a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/erlydtl_compiler.erl
  2. 1 1
      src/erlydtl_filters.erl

+ 1 - 1
src/erlydtl_compiler.erl

@@ -280,7 +280,7 @@ init_context(ParseTrail, DefDir, Module, Options) ->
            lists_0_based = proplists:get_value(lists_0_based, Options, Ctx#dtl_context.lists_0_based),
            tuples_0_based = proplists:get_value(tuples_0_based, Options, Ctx#dtl_context.tuples_0_based),
            checks = proplists:substitute_negations(
-                      [{no_non_block_tag}],
+                      [{no_non_block_tag, non_block_tag}],
                       proplists:get_all_values(w, Options))
           },
     Context1 = load_libraries(proplists:get_value(default_libraries, Options, []), Context0),

+ 1 - 1
src/erlydtl_filters.erl

@@ -524,7 +524,7 @@ random(_) ->
     "".
 
 random_num(Value) ->
-    random:seed(now()),
+    _ = random:seed(now()),
     random:uniform(Value).
 
 %% random tags to be used when using erlydtl in testing