From a61c107d6e955aeecdeefb26f35ff0ffa31b11c2 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Fri, 2 May 2014 16:00:24 +0200 Subject: [PATCH 1/2] Silence warnings on OTP 17.0 --- include/eredis.hrl | 7 +++++++ include/eredis_sub.hrl | 2 +- rebar.config | 4 +++- src/eredis_client.erl | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/eredis.hrl b/include/eredis.hrl index e5221f15..e39071bb 100644 --- a/include/eredis.hrl +++ b/include/eredis.hrl @@ -17,6 +17,13 @@ -type continuation_data() :: any(). -type parser_state() :: status_continue | bulk_continue | multibulk_continue. +%% Internal types +-ifdef(namespaced_types). +-type eredis_queue() :: queue:queue(). +-else. +-type eredis_queue() :: queue(). +-endif. + %% Internal parser state. Is returned from parse/2 and must be %% included on the next calls to parse/2. -record(pstate, { diff --git a/include/eredis_sub.hrl b/include/eredis_sub.hrl index 6da78aff..87d49f0c 100644 --- a/include/eredis_sub.hrl +++ b/include/eredis_sub.hrl @@ -16,7 +16,7 @@ % This is the queue of messages to send to the controlling % process. - msg_queue :: queue(), + msg_queue :: eredis_queue(), %% When the queue reaches this size, either drop all %% messages or exit. diff --git a/rebar.config b/rebar.config index 674d3cf8..bda6f4f1 100644 --- a/rebar.config +++ b/rebar.config @@ -1,4 +1,6 @@ -{erl_opts, []}. +{erl_opts, [ + {platform_define, "^[0-9]+", namespaced_types} +]}. {cover_enabled, true}. %% basho_bench_driver_erldis calls undefined functions, so disable xref_checks. %% This allows this project to be used as a dependency by other rebar projects diff --git a/src/eredis_client.erl b/src/eredis_client.erl index 9fde5389..2bc298e9 100644 --- a/src/eredis_client.erl +++ b/src/eredis_client.erl @@ -40,7 +40,7 @@ socket :: port() | undefined, parser_state :: #pstate{} | undefined, - queue :: queue() | undefined + queue :: eredis_queue() | undefined }). %% @@ -256,7 +256,7 @@ reply(Value, Queue) -> %% @doc Send `Value' to each client in queue. Only useful for sending %% an error message. Any in-progress reply data is ignored. --spec reply_all(any(), queue()) -> ok. +-spec reply_all(any(), eredis_queue()) -> ok. reply_all(Value, Queue) -> case queue:peek(Queue) of empty -> From 4fce36d2262ab7c235b6f37a9ca0b981bc92bfc5 Mon Sep 17 00:00:00 2001 From: David Robakowski Date: Wed, 7 May 2014 14:38:44 +0200 Subject: [PATCH 2/2] Update Travis-CI OTP release 17.0-rc1 to 17.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6dc62812..156fb1ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: erlang notifications: email: false otp_release: - - 17.0-rc1 + - 17.0 - R16B03-1 - R16B03 - R16B02