mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-17 12:09:59 +01:00
Fixed more compiler warnings
This commit is contained in:
@@ -41,7 +41,8 @@ void Accesspoints::printSelected() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int c = count();
|
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)) {
|
if (getSelected(i)) {
|
||||||
print(i, j == 0, j == max - 1);
|
print(i, j == 0, j == max - 1);
|
||||||
j++;
|
j++;
|
||||||
|
|||||||
@@ -337,8 +337,8 @@ void SerialInterface::runCommand(String input) {
|
|||||||
// deselect [<type>] [<id>]
|
// deselect [<type>] [<id>]
|
||||||
else if (eqlsCMD(0, CLI_SELECT) || eqlsCMD(0, CLI_DESELECT)) {
|
else if (eqlsCMD(0, CLI_SELECT) || eqlsCMD(0, CLI_DESELECT)) {
|
||||||
bool select = eqlsCMD(0, CLI_SELECT);
|
bool select = eqlsCMD(0, CLI_SELECT);
|
||||||
int mode; // aps = 0, stations = 1, names = 2
|
int mode = 0; // aps = 0, stations = 1, names = 2
|
||||||
int id; // -1 = all, -2 name string
|
int id = -1; // -1 = all, -2 name string
|
||||||
|
|
||||||
if (list->size() == 1 || eqlsCMD(1, CLI_ALL)) {
|
if (list->size() == 1 || eqlsCMD(1, CLI_ALL)) {
|
||||||
select ? scan.selectAll() : scan.deselectAll();
|
select ? scan.selectAll() : scan.deselectAll();
|
||||||
@@ -998,8 +998,8 @@ void SerialInterface::runCommand(String input) {
|
|||||||
|
|
||||||
for (int i = height; i >= 0; i--) {
|
for (int i = height; i >= 0; i--) {
|
||||||
char s[200];
|
char s[200];
|
||||||
if (i == height) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), scan.getMaxPacket() > height ? scan.getMaxPacket() : height);
|
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() > height ? scan.getMaxPacket()/2 : height/2);
|
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 if (i == 0) sprintf(s,str(CLI_DRAW_OUTPUT).c_str(), 0);
|
||||||
else{
|
else{
|
||||||
s[0] = SPACE;
|
s[0] = SPACE;
|
||||||
|
|||||||
@@ -358,8 +358,6 @@ void SimpleList<T>::sort(bool (*cmp)(T &a, T &b)) {
|
|||||||
|
|
||||||
Node<T>* nodeA;
|
Node<T>* nodeA;
|
||||||
Node<T>* nodeB;
|
Node<T>* nodeB;
|
||||||
Node<T>* nodeC;
|
|
||||||
Node<T>* nodeD;
|
|
||||||
|
|
||||||
int c = listSize;
|
int c = listSize;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ void Stations::add(uint8_t* mac, int accesspointNum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Stations::findStation(uint8_t* mac) {
|
int Stations::findStation(uint8_t* mac) {
|
||||||
uint8_t* station_i_mac;
|
|
||||||
int c = count();
|
int c = count();
|
||||||
for (int i = 0; i < c; i++) {
|
for (int i = 0; i < c; i++) {
|
||||||
if (memcmp(getMac(i), mac, 6) == 0)
|
if (memcmp(getMac(i), mac, 6) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user