diff options
author | Pete Batard <pete@akeo.ie> | 2013-03-16 16:39:14 +0000 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2013-03-16 23:40:30 +0000 |
commit | 5ab16a216589d59a4dc85e76b0790ea4196f836a (patch) | |
tree | aa3465d58af2243170306517efbc4c9acfe3cf47 /tests | |
parent | e78d37b2acbd804841e8206216a9ffad2112ebb2 (diff) | |
download | libusb-5ab16a216589d59a4dc85e76b0790ea4196f836a.tar.gz |
Tests: Suppress Visual Studio 2012 Code Analysis warnings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/testlib.c b/tests/testlib.c index 77395cb..e69aa39 100644 --- a/tests/testlib.c +++ b/tests/testlib.c @@ -48,6 +48,7 @@ #define NULL_PATH "/dev/null" #endif #define INVALID_FD -1 +#define IGNORE_RETVAL(expr) do { (void)(expr); } while(0) /** * Converts a test result code into a human readable string. @@ -81,11 +82,11 @@ static void cleanup_test_output(libusbx_testlib_ctx * ctx) #ifndef DISABLE_STDOUT_REDIRECTION if (!ctx->verbose) { if (ctx->old_stdout != INVALID_FD) { - dup2(ctx->old_stdout, STDOUT_FILENO); + IGNORE_RETVAL(dup2(ctx->old_stdout, STDOUT_FILENO)); ctx->old_stdout = INVALID_FD; } if (ctx->old_stderr != INVALID_FD) { - dup2(ctx->old_stderr, STDERR_FILENO); + IGNORE_RETVAL(dup2(ctx->old_stderr, STDERR_FILENO)); ctx->old_stderr = INVALID_FD; } if (ctx->null_fd != INVALID_FD) { |