Browse Source

fix warnings

Namdak Tonpa 6 years ago
parent
commit
a16a449aad
3 changed files with 2 additions and 4 deletions
  1. 1 1
      src/elements/element_script.erl
  2. 0 2
      src/nitro.erl
  3. 1 1
      src/nitro_static.erl

+ 1 - 1
src/elements/element_script.erl

@@ -31,4 +31,4 @@ render_element(Record) ->
     wf_tags:emit_tag(<<"script">>,
     wf_tags:emit_tag(<<"script">>,
       case Record#script.src of
       case Record#script.src of
            [] -> nitro:render(case Record#script.body of undefined -> []; B -> B end);
            [] -> nitro:render(case Record#script.body of undefined -> []; B -> B end);
-           X -> [] end, List).
+           _ -> [] end, List).

+ 0 - 2
src/nitro.erl

@@ -5,8 +5,6 @@
 -behaviour(application).
 -behaviour(application).
 -export([start/2, stop/1, init/1]).
 -export([start/2, stop/1, init/1]).
 
 
--record(ev,      { module, msg, trigger, name }).
-
 start(_StartType, _StartArgs) -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
 start(_StartType, _StartArgs) -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
 stop(_State) -> ok.
 stop(_State) -> ok.
 init([]) -> {ok, {{one_for_one, 5, 10}, []}}.
 init([]) -> {ok, {{one_for_one, 5, 10}, []}}.

+ 1 - 1
src/nitro_static.erl

@@ -53,7 +53,7 @@ last_modified(Req, State={_, {ok, #file_info{mtime=Modified}}, _}) -> {Modified,
 get_file(Req, State={P, {ok, #file_info{size=_Size}}, _}) ->
 get_file(Req, State={P, {ok, #file_info{size=_Size}}, _}) ->
     Path = fixpath(P),
     Path = fixpath(P),
     StringPath = nitro:to_list(unicode:characters_to_binary(Path,utf8,utf8)),
     StringPath = nitro:to_list(unicode:characters_to_binary(Path,utf8,utf8)),
-    [_Type,Name|RestPath]=SplitPath = filename:split(StringPath),
+    [_Type,Name|RestPath] = filename:split(StringPath),
     FileName = filename:absname(StringPath),
     FileName = filename:absname(StringPath),
     Raw = case file:read_file(FileName) of
     Raw = case file:read_file(FileName) of
           {ok,Bin} -> Bin;
           {ok,Bin} -> Bin;