summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2013-03-16 16:39:14 +0000
committerPete Batard <pete@akeo.ie>2013-03-16 23:40:30 +0000
commit5ab16a216589d59a4dc85e76b0790ea4196f836a (patch)
treeaa3465d58af2243170306517efbc4c9acfe3cf47
parente78d37b2acbd804841e8206216a9ffad2112ebb2 (diff)
downloadlibusb-5ab16a216589d59a4dc85e76b0790ea4196f836a.tar.gz
Tests: Suppress Visual Studio 2012 Code Analysis warnings
-rw-r--r--libusb/version_nano.h2
-rw-r--r--tests/testlib.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 04ee3a8..22e03e4 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10630
+#define LIBUSB_NANO 10631
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) {