qshell fix sign-compare

This commit is contained in:
Daniel Agar
2017-08-28 16:01:18 -04:00
committed by Beat Küng
parent e6f2ba9864
commit dd70892cb8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ int QShell::main(std::vector<std::string> argList)
std::string cmd;
for (int i = 0; i < argList.size(); i++) {
for (size_t i = 0; i < argList.size(); i++) {
cmd += argList[i];
if (i < argList.size() - 1) {
@@ -74,7 +74,7 @@ int QShell::main(std::vector<std::string> argList)
m_qshell_req.strlen = cmd.size();
for (int i = 0; i < cmd.size(); i++) {
for (size_t i = 0; i < cmd.size(); i++) {
m_qshell_req.string[i] = (int) cmd[i];
}
+1 -1
View File
@@ -98,7 +98,7 @@ int QShell::main()
std::string arg;
std::vector<std::string> appargs;
for (int str_idx = 0; str_idx < m_qshell_req.strlen; str_idx++) {
for (size_t str_idx = 0; str_idx < m_qshell_req.strlen; str_idx++) {
current_char = m_qshell_req.string[str_idx];
if (isspace(current_char)) { // split at spaces