Skip to content

Commit

Permalink
--no-depwarn turns of method warnings as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolewski committed Dec 11, 2014
1 parent 226a8d9 commit 1ca287f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ function depwarn(msg, funcsym)
warn(msg, once=(caller!=C_NULL), key=caller, bt=bt)
end

shouldwarn() = (opts = compileropts(); bool(opts.depwarn))

function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol)
!shouldwarn() && return C_NULL
# Identify the calling line
i = 1
while i <= length(bt)
Expand Down
2 changes: 1 addition & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ end
warn(err::Exception; prefix="ERROR: ", kw...) =
warn(sprint(io->showerror(io,err)), prefix=prefix; kw...)

# Julia compiler options struct
# Julia compiler options struct (see jl_compileropts_t in src/julia.h)
immutable JLCompilerOpts
build_path::Ptr{Cchar}
code_coverage::Int8
Expand Down
2 changes: 1 addition & 1 deletion ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static const char *opts =
" -O, --optimize Run time-intensive code optimizations\n"
" --int-literals={32|64} Select integer literal size independent of platform\n"
" --dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)\n"
" --no-depwarn Turn off deprecated syntax warnings\n";
" --no-depwarn Turn off syntax and method deprecation warnings\n";

void parse_opts(int *argcp, char ***argvp)
{
Expand Down

0 comments on commit 1ca287f

Please sign in to comment.