Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compiler warning (sign-compare) in list_ports_linux.cc #300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix compiler warning
KentaKato committed Mar 26, 2024
commit 27d6839f46d4d88aaa62702e70c200e7407f3c0b
4 changes: 2 additions & 2 deletions src/impl/list_ports/list_ports_linux.cc
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ glob(const vector<string>& patterns)
glob_retval = glob(iter->c_str(), GLOB_APPEND, NULL, &glob_results);
}

for(int path_index = 0; path_index < glob_results.gl_pathc; path_index++)
for(size_t path_index = 0; path_index < glob_results.gl_pathc; path_index++)
{
paths_found.push_back(glob_results.gl_pathv[path_index]);
}
@@ -243,7 +243,7 @@ format(const char* format, ...)
{
done = true;
}
else if( return_value >= buffer_size_bytes )
else if( return_value >= static_cast<int>(buffer_size_bytes) )
{
// Realloc and try again.