Skip to content

Instantly share code, notes, and snippets.

@innerlee
Created May 10, 2016 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save innerlee/dbcf10700610cd6006e43123045ee1ed to your computer and use it in GitHub Desktop.
Save innerlee/dbcf10700610cd6006e43123045ee1ed to your computer and use it in GitHub Desktop.
macro nowarn(expr)
quote
stderr = STDERR
stream = open("/dev/null", "a")
redirect_stderr(stream)
result = $(esc(expr))
redirect_stderr(stderr)
close(stream)
result
end
end
@nowarn function myfunc()
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment