mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 21:26:43 +00:00
Fix warning: comparison between signed and unsigned integer expressions
This commit is contained in:
parent
a546ac2f4a
commit
06ee1a3c78
@ -177,7 +177,7 @@ int Parser::format_bytes(size_t filesize, char* buf, size_t len)
|
|||||||
filesize = filesize * 10 / 1024; // multiply by 10 for 1 decimal place
|
filesize = filesize * 10 / 1024; // multiply by 10 for 1 decimal place
|
||||||
int unit = 0;
|
int unit = 0;
|
||||||
|
|
||||||
while(filesize >= 10240 && unit < sizeof(labels) - 1) { // it is multiplied by 10
|
while(filesize >= 10240 && unit < (sizeof(labels) - 1)) { // it is multiplied by 10
|
||||||
unit++;
|
unit++;
|
||||||
filesize = filesize / 1024;
|
filesize = filesize / 1024;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user