Browse Source

fix warnings - erl19

221V 1 year ago
parent
commit
fff00afb7f

+ 1 - 1
priv/web/apps/sample/src/index.erl

@@ -1,5 +1,5 @@
 -module(index).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 -include_lib("n2o/include/wf.hrl").
 -include_lib("nitro/include/nitro.hrl").
 

+ 1 - 1
priv/web/apps/sample/src/sample.erl

@@ -2,7 +2,7 @@
 -behaviour(supervisor).
 -behaviour(application).
 -export([init/1, start/2, stop/1, main/1]).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 main(A)    -> mad_repl:sh(A).
 start(_,_) -> supervisor:start_link({local,sample},sample,[]).

+ 1 - 1
src/compile/mad_app.erl

@@ -1,6 +1,6 @@
 -module(mad_app).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 app_src_to_app(Filename) -> filename:basename(Filename, ".app.src") ++ ".app".
 

+ 1 - 1
src/compile/mad_compile.erl

@@ -1,6 +1,6 @@
 -module(mad_compile).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 compile(Params) ->
     { Cwd, ConfigFile, Conf } = mad_utils:configs(),

+ 1 - 1
src/compile/mad_dtl.erl

@@ -1,6 +1,6 @@
 -module(mad_dtl).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 compile(Dir,Config) ->
     case mad_utils:get_value(erlydtl_opts, Config, []) of

+ 1 - 1
src/compile/mad_erl.erl

@@ -1,6 +1,6 @@
 -module(mad_erl).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 -define(COMPILE_OPTS(Inc, Ebin, Opts, Deps), [return_errors, {i, [Inc]}, {outdir, Ebin}] ++ Opts++Deps).
 
 erl_to_beam(Bin, F) -> filename:join(Bin, filename:basename(F, ".erl") ++ ".beam").

+ 1 - 1
src/compile/mad_leex.erl

@@ -1,6 +1,6 @@
 -module(mad_leex).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 xrl_to_erl(F) -> filename:join(filename:dirname(F),filename:basename(F, ".xrl")) ++ ".erl".
 

+ 1 - 1
src/compile/mad_none.erl

@@ -1,4 +1,4 @@
 -module(mad_none).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 compile(_,_,_,_,_) -> false.

+ 1 - 1
src/compile/mad_port.erl

@@ -1,6 +1,6 @@
 -module(mad_port).
 -copyright('Maxim Sokhatsky').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 replace_env(String, []) -> String;
 replace_env(String, [{K,V}|Env]) ->

+ 1 - 1
src/compile/mad_script.erl

@@ -1,6 +1,6 @@
 -module(mad_script).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 script(ConfigFile, Conf, _) ->
     File = ConfigFile ++ ".script",

+ 1 - 1
src/compile/mad_yecc.erl

@@ -1,6 +1,6 @@
 -module(mad_yecc).
 -copyright('Sina Samavati').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 yrl_to_erl(F) -> filename:join(filename:dirname(F),filename:basename(F, ".yrl")) ++ ".erl".
 

+ 1 - 1
src/package/mad_escript.erl

@@ -1,6 +1,6 @@
 -module(mad_escript).
 -description("ESCRIPT bundles").
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 main(N) ->
     App = filename:basename(case N of [] -> mad_utils:cwd(); E -> E end),

+ 1 - 1
src/package/mad_ling.erl

@@ -1,7 +1,7 @@
 -module(mad_ling).
 -description("LING Erlang Virtual Machine Bundle Packaging").
 -copyright('Cloudozer, LLP').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 -define(ARCH, list_to_atom( case os:getenv("ARCH") of false -> "posix"; A -> A end)).
 
 ling(Params) ->

+ 1 - 1
src/package/mad_systools.erl

@@ -1,6 +1,6 @@
 -module(mad_systools).
 -description("ERTS releases with systools").
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 % beam releases
 

+ 1 - 1
src/profile/mad_local.erl

@@ -1,5 +1,5 @@
 -module(mad_local).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 compile(Params)   -> mad_compile:compile(Params).
 app(Params)       -> mad_static:app(Params).

+ 1 - 1
src/profile/mad_vz.erl

@@ -1,5 +1,5 @@
 -module(mad_vz).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 compile(Params)   -> mad_compile:compile(Params).
 app(Params)       -> mad_static:app(Params).

+ 1 - 1
src/provision/mad_repl.erl

@@ -1,6 +1,6 @@
 -module(mad_repl).
 -copyright('Maxim Sokhatsky').
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 disabled() -> [].
 system() -> [compiler,syntax_tools,sasl,tools,mnesia,reltool,xmerl,crypto,kernel,stdlib,ssh,eldap,

+ 1 - 1
src/provision/mad_run.erl

@@ -1,5 +1,5 @@
 -module(mad_run).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 start(App) ->                            % run_dir > < log_dir
     mad:info("Scripting: ~p~n",[escript:script_name()]),

+ 1 - 1
src/provision/mad_vz.erl

@@ -1,5 +1,5 @@
 -module(mad_vz).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 create(App,_) -> create(App).
 create(App) ->

+ 1 - 1
src/sources/mad_git.erl

@@ -1,5 +1,5 @@
 -module(mad_git).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 deps(Params) ->
     { Cwd, ConfigFile, Conf } = mad_utils:configs(),

+ 1 - 1
src/sources/mad_synrc.erl

@@ -1,5 +1,5 @@
 -module(mad_synrc).
--compile(export_all).
+-compile([export_all, nowarn_export_all]).
 
 deps(Params) ->
     { Cwd, ConfigFile, Conf } = mad_utils:configs(),