Enable bugprone-unused-local-non-trivial-variable

And fix the two problems.

Change-Id: Ib91625d66e42fe8b14aaf1ef33761f9084564de9
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/.clang-tidy b/.clang-tidy
index 92c35a8..fb31ead 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -54,6 +54,7 @@
 bugprone-undelegated-constructor,
 bugprone-unhandled-exception-at-new,
 bugprone-unhandled-self-assignment,
+bugprone-unused-local-non-trivial-variable,
 bugprone-unused-raii,
 bugprone-unused-return-value,
 bugprone-use-after-move,
diff --git a/src/ADCSensorMain.cpp b/src/ADCSensorMain.cpp
index b606a9b..21711a9 100644
--- a/src/ADCSensorMain.cpp
+++ b/src/ADCSensorMain.cpp
@@ -105,7 +105,6 @@
             std::regex_search(pathStr, match, inputRegex);
             std::string indexStr = *(match.begin() + 1);
 
-            auto directory = path.parent_path();
             // convert to 0 based
             size_t index = std::stoul(indexStr) - 1;
 
diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
index 4f73cec..1201a19 100644
--- a/src/PSUEvent.cpp
+++ b/src/PSUEvent.cpp
@@ -253,7 +253,6 @@
 
     if (!err)
     {
-        std::string response;
         try
         {
             int nvalue = std::stoi(bufferRef.data());