diff --git a/esp8266_deauther/Accesspoints.cpp b/esp8266_deauther/Accesspoints.cpp index f28096d..fe5fe5b 100644 --- a/esp8266_deauther/Accesspoints.cpp +++ b/esp8266_deauther/Accesspoints.cpp @@ -41,7 +41,8 @@ void Accesspoints::printSelected() { return; } int c = count(); - for (int i = 0, j = 0; i < c, j < max; i++) { + int j = 0; + for (int i = 0; i < c && j < max; i++) { if (getSelected(i)) { print(i, j == 0, j == max - 1); j++; diff --git a/esp8266_deauther/SerialInterface.cpp b/esp8266_deauther/SerialInterface.cpp index 163cc2a..dbb36a5 100644 --- a/esp8266_deauther/SerialInterface.cpp +++ b/esp8266_deauther/SerialInterface.cpp @@ -337,8 +337,8 @@ void SerialInterface::runCommand(String input) { // deselect [] [] else if (eqlsCMD(0, CLI_SELECT) || eqlsCMD(0, CLI_DESELECT)) { bool select = eqlsCMD(0, CLI_SELECT); - int mode; // aps = 0, stations = 1, names = 2 - int id; // -1 = all, -2 name string + int mode = 0; // aps = 0, stations = 1, names = 2 + int id = -1; // -1 = all, -2 name string if (list->size() == 1 || eqlsCMD(1, CLI_ALL)) { select ? scan.selectAll() : scan.deselectAll(); @@ -998,8 +998,8 @@ void SerialInterface::runCommand(String input) { for (int i = height; i >= 0; i--) { char s[200]; - if (i == height) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), scan.getMaxPacket() > height ? scan.getMaxPacket() : height); - else if (i == height / 2) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), scan.getMaxPacket() > height ? scan.getMaxPacket()/2 : height/2); + if (i == height) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), scan.getMaxPacket() > (uint32_t)height ? scan.getMaxPacket() : (uint32_t)height); + else if (i == height / 2) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), scan.getMaxPacket() > (uint32_t)height ? scan.getMaxPacket()/2 : (uint32_t)height/2); else if (i == 0) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), 0); else{ s[0] = SPACE; diff --git a/esp8266_deauther/SimpleList.h b/esp8266_deauther/SimpleList.h index 161bdac..99d2203 100644 --- a/esp8266_deauther/SimpleList.h +++ b/esp8266_deauther/SimpleList.h @@ -358,8 +358,6 @@ void SimpleList::sort(bool (*cmp)(T &a, T &b)) { Node* nodeA; Node* nodeB; - Node* nodeC; - Node* nodeD; int c = listSize; diff --git a/esp8266_deauther/Stations.cpp b/esp8266_deauther/Stations.cpp index 5f4ccb8..665846f 100644 --- a/esp8266_deauther/Stations.cpp +++ b/esp8266_deauther/Stations.cpp @@ -18,7 +18,6 @@ void Stations::add(uint8_t* mac, int accesspointNum) { } int Stations::findStation(uint8_t* mac) { - uint8_t* station_i_mac; int c = count(); for (int i = 0; i < c; i++) { if (memcmp(getMac(i), mac, 6) == 0)