From 1b4034e08111781b27309dcb2445aa1791c2aac7 Mon Sep 17 00:00:00 2001 From: Falk Werner Date: Sun, 1 Mar 2020 14:00:49 +0100 Subject: [PATCH] fix: do not ignore return value of mkdtemp --- test/webfuse/tests/integration/server.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/webfuse/tests/integration/server.cc b/test/webfuse/tests/integration/server.cc index 1360934..847efa2 100644 --- a/test/webfuse/tests/integration/server.cc +++ b/test/webfuse/tests/integration/server.cc @@ -20,7 +20,12 @@ public: : is_shutdown_requested(false) { snprintf(base_dir, WF_PATH_MAX, "%s", "/tmp/webfuse_test_integration_XXXXXX"); - mkdtemp(base_dir); + char const * result = mkdtemp(base_dir); + if (NULL == result) + { + throw std::runtime_error("unable to create temp dir"); + } + config = wf_server_config_create(); wf_server_config_set_port(config, 8080);