From a78fbf919d903515f7bbdf26840fb950c6d41b0a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 18:34:28 -0600 Subject: [PATCH] fix optimized unused variable warning --- gtk2_ardour/sfdb_freesound_mootcher.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc index 416e635cfc..b058fbec05 100644 --- a/gtk2_ardour/sfdb_freesound_mootcher.cc +++ b/gtk2_ardour/sfdb_freesound_mootcher.cc @@ -457,7 +457,9 @@ CURLcode res; DEBUG_TRACE(PBD::DEBUG::Freesound, string_compose("renaming %1.part to %1\n", audioFileName)); int r = rename ( (audioFileName+".part").c_str(), audioFileName.c_str() ); if (r != 0) { +#ifndef NDEBUG const char *err = strerror(errno); +#endif DEBUG_TRACE(PBD::DEBUG::Freesound, string_compose("rename() failed: %1\n", err)); assert(0); } else {