Created
May 10, 2016 03:29
-
-
Save innerlee/dbcf10700610cd6006e43123045ee1ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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