From 69f185af3de2b1661aa6e7ec8bb1316fc47658c5 Mon Sep 17 00:00:00 2001
From: Christopher Stawarz <cstawarz@mit.edu>
Date: Mon, 28 Mar 2016 10:27:52 -0400
Subject: [PATCH] Addressed some compiler warnings

---
 Source/Plugins/NetworkEvents/NetworkEvents.cpp     |  4 ++--
 Source/Plugins/SpikeSorter/SpikeSortBoxes.cpp      |  2 +-
 .../DataThreads/RhythmNode/RHD2000Editor.cpp       |  6 +++---
 Source/Processors/Editors/ChannelSelector.cpp      | 14 +++++++-------
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Source/Plugins/NetworkEvents/NetworkEvents.cpp b/Source/Plugins/NetworkEvents/NetworkEvents.cpp
index 0dcfa9353..0982e85d8 100644
--- a/Source/Plugins/NetworkEvents/NetworkEvents.cpp
+++ b/Source/Plugins/NetworkEvents/NetworkEvents.cpp
@@ -298,7 +298,7 @@ void NetworkEvents::postTimestamppedStringToMidiBuffer(StringTS s, MidiBuffer& e
              (uint8) s.len+1,//+8,
              msg_with_ts);
 
-    delete msg_with_ts;
+    delete[] msg_with_ts;
 }
 
 void NetworkEvents::simulateStopRecord()
@@ -594,7 +594,7 @@ void NetworkEvents::run()
 
 
     zmq_close(responder);
-    delete buffer;
+    delete[] buffer;
     threadRunning = false;
     return;
 #endif
diff --git a/Source/Plugins/SpikeSorter/SpikeSortBoxes.cpp b/Source/Plugins/SpikeSorter/SpikeSortBoxes.cpp
index 835c972e4..6158a63fa 100644
--- a/Source/Plugins/SpikeSorter/SpikeSortBoxes.cpp
+++ b/Source/Plugins/SpikeSorter/SpikeSortBoxes.cpp
@@ -2029,7 +2029,7 @@ void PCAjob::computeCov()
             cov[j][i] = sum / (dim-1);
         }
     }
-    delete mean;
+    delete[] mean;
 
     // delete covariances
     //for (int k = 0; k < dim; k++)
diff --git a/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp b/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
index f2e842cda..cc87903c3 100644
--- a/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
+++ b/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
@@ -1437,10 +1437,10 @@ void AudioInterface::paint(Graphics& g)
 // Clock Divider options
 ClockDivideInterface::ClockDivideInterface(RHD2000Thread* board_,
                                            RHD2000Editor* editor_) :
-   board(board_)
- , editor(editor_)
- , name("Clock Divider")
+   name("Clock Divider")
  , lastDivideRatioString("1")
+ , board(board_)
+ , editor(editor_)
  , actualDivideRatio(1)
  
 {
diff --git a/Source/Processors/Editors/ChannelSelector.cpp b/Source/Processors/Editors/ChannelSelector.cpp
index 6caf21b16..70d4cdec4 100755
--- a/Source/Processors/Editors/ChannelSelector.cpp
+++ b/Source/Processors/Editors/ChannelSelector.cpp
@@ -684,7 +684,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonParam->removeListener(this);
         deselectButtonParam->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = paramBox->getBoxInfo(parameterButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -712,7 +712,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonRecord->removeListener(this);
         deselectButtonRecord->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = recordBox->getBoxInfo(recordButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -740,7 +740,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonAudio->removeListener(this);
         deselectButtonAudio->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = audioBox->getBoxInfo(audioButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -768,7 +768,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonParam->removeListener(this);
         deselectButtonParam->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = paramBox->getBoxInfo(parameterButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -796,7 +796,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonRecord->removeListener(this);
         deselectButtonRecord->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = recordBox->getBoxInfo(recordButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -824,7 +824,7 @@ void ChannelSelector::buttonClicked(Button* button)
         selectButtonAudio->removeListener(this);
         deselectButtonAudio->removeListener(this);
         std::vector<int> getBoxList;
-        int fa, lim, comd, i, j;
+        int fa, lim, comd, i;
         getBoxList = audioBox->getBoxInfo(audioButtons.size());
         if (getBoxList.size() < 3)
         {
@@ -1239,7 +1239,7 @@ ChannelSelectorBox::~ChannelSelectorBox()
 int ChannelSelectorBox::convertToInteger(std::string s)
 {
     char ar[20];
-    int i, j, k = 0;
+    int i, k = 0;
     for (i = 0; i < s.size(); i++)
     {
         if (s[i] >= 48 && s[i] <= 57)
-- 
GitLab