You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2010/08/31 00:05:57 UTC

svn commit: r990999 - in /incubator/thrift/trunk/lib/erl/src: thrift_binary_protocol.erl thrift_disk_log_transport.erl thrift_processor.erl thrift_protocol.erl thrift_server.erl thrift_socket_server.erl

Author: dreiss
Date: Mon Aug 30 22:05:57 2010
New Revision: 990999

URL: http://svn.apache.org/viewvc?rev=990999&view=rev
Log:
erlang: Fix several compilation warnings

Modified:
    incubator/thrift/trunk/lib/erl/src/thrift_binary_protocol.erl
    incubator/thrift/trunk/lib/erl/src/thrift_disk_log_transport.erl
    incubator/thrift/trunk/lib/erl/src/thrift_processor.erl
    incubator/thrift/trunk/lib/erl/src/thrift_protocol.erl
    incubator/thrift/trunk/lib/erl/src/thrift_server.erl
    incubator/thrift/trunk/lib/erl/src/thrift_socket_server.erl

Modified: incubator/thrift/trunk/lib/erl/src/thrift_binary_protocol.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_binary_protocol.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_binary_protocol.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_binary_protocol.erl Mon Aug 30 22:05:57 2010
@@ -187,7 +187,7 @@ read(This0, message_begin) ->
             %% there's a version number but it's unexpected
             {This1, {error, {bad_binary_protocol_version, Sz}}};
 
-        {ok, Sz} when This1#binary_protocol.strict_read =:= true ->
+        {ok, _Sz} when This1#binary_protocol.strict_read =:= true ->
             %% strict_read is true and there's no version header; that's an error
             {This1, {error, no_binary_protocol_version}};
 

Modified: incubator/thrift/trunk/lib/erl/src/thrift_disk_log_transport.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_disk_log_transport.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_disk_log_transport.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_disk_log_transport.erl Mon Aug 30 22:05:57 2010
@@ -68,7 +68,7 @@ parse_opts([{sync_every, Int} | Rest], S
 %%%% TRANSPORT IMPLENTATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %% disk_log_transport is write-only
-read(State, Len) ->
+read(State, _Len) ->
     {State, {error, no_read_from_disk_log}}.
 
 write(This = #dl_transport{log = Log}, Data) ->

Modified: incubator/thrift/trunk/lib/erl/src/thrift_processor.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_processor.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_processor.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_processor.erl Mon Aug 30 22:05:57 2010
@@ -26,7 +26,7 @@
 
 -record(thrift_processor, {handler, protocol, service}).
 
-init({Server, ProtoGen, Service, Handler}) when is_function(ProtoGen, 0) ->
+init({_Server, ProtoGen, Service, Handler}) when is_function(ProtoGen, 0) ->
     {ok, Proto} = ProtoGen(),
     loop(#thrift_processor{protocol = Proto,
                            service = Service,

Modified: incubator/thrift/trunk/lib/erl/src/thrift_protocol.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_protocol.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_protocol.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_protocol.erl Mon Aug 30 22:05:57 2010
@@ -183,7 +183,7 @@ read_specific(Proto = #protocol{module =
     {Proto#protocol{data = NewData}, Result}.
 
 read_struct_loop(IProto0, SDict, RTuple) ->
-    {IProto1, #protocol_field_begin{type = FType, id = Fid, name = Name}} =
+    {IProto1, #protocol_field_begin{type = FType, id = Fid}} =
         thrift_protocol:read(IProto0, field_begin),
     case {FType, Fid} of
         {?tType_STOP, _} ->
@@ -323,7 +323,6 @@ write(Proto, {{struct, {Module, Structur
   when is_atom(Module),
        is_atom(StructureName),
        element(1, Data) =:= StructureName ->
-    StructType = Module:struct_info(StructureName),
     write(Proto, {Module:struct_info(StructureName), Data});
 
 write(Proto0, {{list, Type}, Data})

Modified: incubator/thrift/trunk/lib/erl/src/thrift_server.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_server.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_server.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_server.erl Mon Aug 30 22:05:57 2010
@@ -126,7 +126,7 @@ handle_info({inet_async, ListenSocket, R
             {stop, Reason, State}
     end;
 
-handle_info({inet_async, ListenSocket, Ref, Error}, State) ->
+handle_info({inet_async, _ListenSocket, _Ref, Error}, State) ->
     error_logger:error_msg("Error in acceptor: ~p~n", [Error]),
     {stop, Error, State};
 

Modified: incubator/thrift/trunk/lib/erl/src/thrift_socket_server.erl
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/erl/src/thrift_socket_server.erl?rev=990999&r1=990998&r2=990999&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/erl/src/thrift_socket_server.erl (original)
+++ incubator/thrift/trunk/lib/erl/src/thrift_socket_server.erl Mon Aug 30 22:05:57 2010
@@ -166,13 +166,12 @@ gen_tcp_listen(Port, Opts, State) ->
 new_acceptor(State=#thrift_socket_server{max=0}) ->
     error_logger:error_msg("Not accepting new connections"),
     State#thrift_socket_server{acceptor=null};
-new_acceptor(State=#thrift_socket_server{acceptor=OldPid, listen=Listen,
+new_acceptor(State=#thrift_socket_server{listen=Listen,
                                          service=Service, handler=Handler,
                                          socket_opts=Opts, framed=Framed
                                         }) ->
     Pid = proc_lib:spawn_link(?MODULE, acceptor_loop,
                               [{self(), Listen, Service, Handler, Opts, Framed}]),
-%%     error_logger:info_msg("Spawning new acceptor: ~p => ~p", [OldPid, Pid]),
     State#thrift_socket_server{acceptor=Pid}.
 
 acceptor_loop({Server, Listen, Service, Handler, SocketOpts, Framed})