mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
cast to unsigned for comparisons
This commit is contained in:
parent
e7f16cb77c
commit
0b9d5d5f9f
@ -54,16 +54,16 @@ glob(const vector<string>& patterns)
|
||||
|
||||
glob_t glob_results;
|
||||
|
||||
int glob_retval = glob(patterns[0].c_str(), 0, NULL, &glob_results);
|
||||
glob(patterns[0].c_str(), 0, NULL, &glob_results);
|
||||
|
||||
vector<string>::const_iterator iter = patterns.begin();
|
||||
|
||||
while(++iter != patterns.end())
|
||||
{
|
||||
glob_retval = glob(iter->c_str(), GLOB_APPEND, NULL, &glob_results);
|
||||
glob(iter->c_str(), GLOB_APPEND, NULL, &glob_results);
|
||||
}
|
||||
|
||||
for(int path_index = 0; path_index < glob_results.gl_pathc; path_index++)
|
||||
for(unsigned int 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(static_cast<unsigned int>(return_value) >= buffer_size_bytes)
|
||||
{
|
||||
// Realloc and try again.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user