aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-27 17:52:25 +0200
committerLoïc Hoguin <[email protected]>2018-06-27 17:52:25 +0200
commit68ede9cfe4b9dc1199405c981e160dd9edffcced (patch)
tree37fb7b8045ea13feccd8ce6ab0407158c7e0712c
parent6b1db885d1b07f675e00daa641eeae2e36dbb1ba (diff)
downloadcowboy-68ede9cfe4b9dc1199405c981e160dd9edffcced.tar.gz
cowboy-68ede9cfe4b9dc1199405c981e160dd9edffcced.tar.bz2
cowboy-68ede9cfe4b9dc1199405c981e160dd9edffcced.zip
Disable warnings for erlang:get_stacktrace/0 in OTP-21+
-rw-r--r--src/cowboy_handler.erl4
-rw-r--r--src/cowboy_http.erl4
-rw-r--r--src/cowboy_http2.erl4
-rw-r--r--src/cowboy_loop.erl4
-rw-r--r--src/cowboy_req.erl4
-rw-r--r--src/cowboy_rest.erl4
-rw-r--r--src/cowboy_stream_h.erl4
-rw-r--r--src/cowboy_websocket.erl4
8 files changed, 32 insertions, 0 deletions
diff --git a/src/cowboy_handler.erl b/src/cowboy_handler.erl
index 3d509b6..26aa30e 100644
--- a/src/cowboy_handler.erl
+++ b/src/cowboy_handler.erl
@@ -20,6 +20,10 @@
-module(cowboy_handler).
-behaviour(cowboy_middleware).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([execute/2]).
-export([terminate/4]).
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 157f246..818a88a 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -14,6 +14,10 @@
-module(cowboy_http).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([init/5]).
-export([system_continue/3]).
diff --git a/src/cowboy_http2.erl b/src/cowboy_http2.erl
index 8a235af..70a5e46 100644
--- a/src/cowboy_http2.erl
+++ b/src/cowboy_http2.erl
@@ -14,6 +14,10 @@
-module(cowboy_http2).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([init/5]).
-export([init/9]).
-export([init/11]).
diff --git a/src/cowboy_loop.erl b/src/cowboy_loop.erl
index 7c59fed..2e5ecdb 100644
--- a/src/cowboy_loop.erl
+++ b/src/cowboy_loop.erl
@@ -15,6 +15,10 @@
-module(cowboy_loop).
-behaviour(cowboy_sub_protocol).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([upgrade/4]).
-export([upgrade/5]).
-export([loop/4]).
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index 90b852e..ee21e98 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -15,6 +15,10 @@
-module(cowboy_req).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
%% Request.
-export([method/1]).
-export([version/1]).
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl
index abec209..c73ee53 100644
--- a/src/cowboy_rest.erl
+++ b/src/cowboy_rest.erl
@@ -17,6 +17,10 @@
-module(cowboy_rest).
-behaviour(cowboy_sub_protocol).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([upgrade/4]).
-export([upgrade/5]).
diff --git a/src/cowboy_stream_h.erl b/src/cowboy_stream_h.erl
index 7f72080..d55846a 100644
--- a/src/cowboy_stream_h.erl
+++ b/src/cowboy_stream_h.erl
@@ -15,6 +15,10 @@
-module(cowboy_stream_h).
-behavior(cowboy_stream).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([init/3]).
-export([data/4]).
-export([info/3]).
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 48816d8..067019c 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -17,6 +17,10 @@
-module(cowboy_websocket).
-behaviour(cowboy_sub_protocol).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{erlang, get_stacktrace, 0}]}).
+-endif.
+
-export([is_upgrade_request/1]).
-export([upgrade/4]).
-export([upgrade/5]).