mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 04:10:35 +08:00
qshell fix sign-compare
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user