From 1296c86f493905bf02aac89f02e714b3de5d5879 Mon Sep 17 00:00:00 2001 From: Juha Sointusalo Date: Sat, 22 Sep 2018 18:28:43 +0300 Subject: [PATCH] client: remove unnecessary chdir() calls in GPU detection GPU detection code goes back and forth between program and data directories but this is unnecessary because run_program() already takes care of running the program in correct directory. Fixes two "ignoring return value" warnings from GCC/GLIBC. --- client/gpu_detect.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/gpu_detect.cpp b/client/gpu_detect.cpp index 7f0578f581..e624bfecbc 100644 --- a/client/gpu_detect.cpp +++ b/client/gpu_detect.cpp @@ -661,8 +661,6 @@ int COPROCS::launch_child_process_to_detect_gpus() { NULL }; - chdir(client_dir); - retval = run_program( client_dir, client_path, @@ -672,8 +670,6 @@ int COPROCS::launch_child_process_to_detect_gpus() { prog ); - chdir(data_dir); - if (retval) { if (log_flags.coproc_debug) { msg_printf(0, MSG_INFO,