Potentially infinite and deleted loops found by PVS-Studio (#7100)

- Fixed V712
 - The compiler can optimize this code by creating an infinite loop, or simply deleting it.
 - There is need to add a volatile qualifier to the '_ExitFlag' and 'sim_delay' variables.
This commit is contained in:
Phillip Khandeliants
2017-04-21 11:13:06 -04:00
committed by Daniel Agar
parent 545458a687
commit 5012dffeae
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ const unsigned path_max_len = PATH_MAX;
const unsigned path_max_len = 1024;
#endif
static bool _ExitFlag = false;
static volatile bool _ExitFlag = false;
static struct termios orig_term;