Permalink
Browse files

Add an Emakefile and fix a bunch of unused variable warnings

  • Loading branch information...
1 parent d86e6b4 commit 9cb217b63e409c066d11cb3dd301baa19329997d @seanlynch seanlynch committed Feb 23, 2010
Showing with 12 additions and 10 deletions.
  1. +2 −0 Emakefile
  2. +7 −7 src/smtp_server.erl
  3. +1 −1 src/smtp_server_example.erl
  4. +1 −1 src/smtp_server_example_auth.erl
  5. +1 −1 src/testit.erl
View
@@ -0,0 +1,2 @@
+{"src/*", [debug_info, {outdir, "ebin"},
+ {i, "include"}]}.
View
@@ -4,33 +4,33 @@
-export([init/3, handle_HELO/2, handle_EHLO/3, handle_MAIL/2, handle_MAIL_extension/2,
handle_RCPT/2, handle_RCPT_extension/2, handle_DATA/4, handle_RSET/1, handle_VRFY/2, handle_other/3]).
-init(Hostname, SessionCount, Address) ->
+init(Hostname, _SessionCount, _Address) ->
Banner = io_lib:format("~s ESMTP smtp_server", [Hostname]),
State = {},
{ok, Banner, State}.
-handle_HELO(Hostname, State) ->
+handle_HELO(_Hostname, State) ->
%io:format("HELO from ~s~n", [Hostname]),
{ok, State}.
-handle_EHLO(Hostname, Extensions, State) ->
+handle_EHLO(_Hostname, Extensions, State) ->
%io:format("EHLO from ~s~n", [Hostname]),
MyExtensions = lists:append(Extensions, [{"WTF", true}]),
{ok, MyExtensions, State}.
-handle_MAIL(From, State) ->
+handle_MAIL(_From, State) ->
%io:format("Mail from ~s~n", [From]),
{ok, State}.
-handle_MAIL_extension(Extension, State) ->
+handle_MAIL_extension(_Extension, State) ->
%io:format("Mail to extension ~s~n", [Extension]),
{ok, State}.
-handle_RCPT(To, State) ->
+handle_RCPT(_To, State) ->
%io:format("Mail to ~s~n", [To]),
{ok, State}.
-handle_RCPT_extension(Extension, State) ->
+handle_RCPT_extension(_Extension, State) ->
%io:format("Mail from extension ~s~n", [Extension]),
{ok, State}.
@@ -23,7 +23,7 @@ handle_HELO(Hostname, State) ->
io:format("HELO from ~s~n", [Hostname]),
{ok, State}.
-handle_EHLO("invalid", Extensions, State) ->
+handle_EHLO("invalid", _Extensions, State) ->
% contrived example
{error, "554 invalid hostname", State};
handle_EHLO(Hostname, Extensions, State) ->
@@ -42,7 +42,7 @@ handle_RCPT_extension(Extension, State) ->
io:format("Mail from extension ~s~n", [Extension]),
{ok, State}.
-handle_DATA(From, To, Data, State) ->
+handle_DATA(_From, _To, _Data, State) ->
% some kind of unique id
Reference = io_lib:format("~p", [make_ref()]),
{ok, Reference, State}.
View
@@ -25,7 +25,7 @@ test2() ->
test3() ->
{ok, Email} = file:read_file(?TFILE),
- {Time, Value} = timer:tc(?MODULE, reverse, [Email]),
+ {Time, _Value} = timer:tc(?MODULE, reverse, [Email]),
io:format("test3 ran in ~B~n", [Time]),
case reverse(Email) of
Email ->

0 comments on commit 9cb217b

Please sign in to comment.