Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing all warnings

  • Loading branch information...
commit 92878d7464e4b44394b84d26fadc08d7408e48d1 1 parent c4e5edb
@gleber authored
View
19 src/agent.erl
@@ -30,10 +30,12 @@
-include("fipa_ontology.hrl").
-export([behave/2, get_acl_semantics/1, get_behaviour/1,
- get_message/1, get_mind/1, get_property/2,
- handle_call/3, handle_cast/2, init/1, join/1, kill/1,
+ get_message/1, get_mind/1, get_property/2, join/1, kill/1,
match_message/2, new/2, send_message/4, set_behaviour/2,
- set_property/3, set_rational/3, stop/1, terminate/2]).
+ set_property/3, set_rational/3, stop/1]).
+
+-export([init/1, code_change/3, handle_call/3, handle_cast/2,
+ handle_info/2, terminate/2]).
-define(AGENT_BEHAVIOURS, '__AGENT_BEHAVIOURS').
@@ -270,6 +272,12 @@ terminate(normal, State) ->
ok.
%%
+%% Code Change
+%%
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+%%
%% Gets a property from agent
%%
handle_call([get_property, PropertyName], From,
@@ -361,6 +369,11 @@ handle_cast([match_message, Pattern, From],
handle_cast(stop, State) -> {stop, normal, State}.
%%
+%% Any message handler
+%%
+handle_info(Any, State) -> {stop, {unknown_info, Any}, State}.
+
+%%
%% OTHER FUNCTIONS
%%
a__set_prop(AgentDict, Property, Value) ->
View
14 src/eresye.erl
@@ -43,8 +43,8 @@
%% Internal exports
%%====================================================================
--export([code_change/3, handle_call/3, init/1,
- terminate/2]).
+-export([code_change/3, handle_call/3, handle_cast/2, handle_info/2,
+ init/1, terminate/2]).
%%====================================================================
%% External functions
@@ -337,6 +337,16 @@ handle_call({get_ontology}, _, State) ->
{reply, Ontology, State}.
%%====================================================================
+%% Cast handler
+%%====================================================================
+handle_cast(Cast, State) -> {stop, {unknown_cast, Cast}, State}.
+
+%%====================================================================
+%% Any message handler
+%%====================================================================
+handle_info(Any, State) -> {stop, {unknown_info, Any}, State}.
+
+%%====================================================================
%% Func: code_change/3
%%====================================================================
code_change(OldVsn, State, Extra) -> {ok, State}.
View
8 src/eresye_agenda.erl
@@ -37,7 +37,7 @@
%% Internal exports
%%====================================================================
--export([code_change/3, handle_call/3, handle_cast/2,
+-export([code_change/3, handle_call/3, handle_cast/2, handle_info/2,
init/1, terminate/2]).
-behaviour(gen_server).
@@ -295,6 +295,12 @@ handle_call_1({_, _, _, Id}) -> Id.
handle_cast({schedule}, Agenda) ->
{noreply, after_execution_schedule__(Agenda)}.
+%%====================================================================
+%% Function: handle_info/2
+%%====================================================================
+handle_info(Any, State) ->
+ {stop, {unknown_info, Any}, State}.
+
after_activation_schedule__(Agenda) ->
{Strategy, RuleList, ExecutorPid, ExecState, NextId} =
Agenda,
View
14 src/logger.erl
@@ -22,7 +22,9 @@
%%
-module(logger).
--behaviour(gen_event).%%====================================================================
+-behaviour(gen_event).
+
+%%====================================================================
%% Include files
%%====================================================================
@@ -36,8 +38,8 @@
%% Internal exports
%%====================================================================
--export([code_change/3, handle_event/2, init/1,
- terminate/2]).
+-export([code_change/3, handle_event/2, handle_call/2, handle_info/2,
+ init/1, terminate/2]).
%%====================================================================
%% External functions
@@ -87,6 +89,12 @@ handle_event(LogEvent, State) ->
end,
{ok, State}.
+handle_call(Call, State) ->
+ {stop, {unknown_call, Call}, State}.
+
+handle_info(Info, State) ->
+ {stop, {unknown_info, Info}, State}.
+
%%====================================================================
%% Func: terminate/2
%% Returns: ok
View
8 src/ontology_service.erl
@@ -33,7 +33,7 @@
%%====================================================================
-export([get_codec/1, register_codec/2]).
--export([code_change/3, handle_call/3, handle_info/2,
+-export([code_change/3, handle_call/3, handle_info/2, handle_cast/2,
init/1, terminate/2]).
%%====================================================================
@@ -90,7 +90,11 @@ handle_call({get_codec, OntologyName}, _, Dict) ->
%%====================================================================
%% Function: handle_info/2
%%====================================================================
-handle_info(_, State) -> {noreply, State}.
+handle_info(Any, State) ->
+ {stop, {unknown_info, Any}, State}.
+
+handle_cast(Call, State) ->
+ {stop, {unknown_cast, Call}, State}.
%%====================================================================
%% Function: terminate/2
View
12 src/simple_agent.erl
@@ -27,10 +27,12 @@
-include("fipa_ontology.hrl").
--export([code_change/3, get_acl_semantics/1, get_mind/1,
- get_property/2, handle_call/3, handle_cast/2,
- handle_info/2, init/1, join/1, kill/1, new/2, new/3,
- set_property/3, set_rational/3, stop/1, terminate/2]).
+-export([get_acl_semantics/1, get_mind/1, get_property/2, join/1,
+ kill/1, new/2, new/3, set_property/3, set_rational/3, stop/1
+ ]).
+
+-export([code_change/3, terminate/2, handle_call/3, handle_cast/2,
+ init/1, handle_info/2, behaviour_info/1]).
%% send_message/4,
%% get_message/1,
@@ -38,7 +40,7 @@
-spec behaviour_info(atom()) -> 'undefined' | [{atom(), arity()}].
behaviour_info(callbacks) ->
- [{init,1},{handle_call,3},{handle_cast,2},{handle_info,2},
+ [{init,2},{handle_call,3},{handle_cast,2},{handle_info,2},
{terminate,2},{code_change,3}];
behaviour_info(_Other) ->
undefined.
Please sign in to comment.
Something went wrong with that request. Please try again.