Skip to content

Commit

Permalink
windows build, remove some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Fabijanic committed Dec 20, 2016
1 parent cdcb49e commit 0e31e5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions userspace/libsinsp/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ int32_t sinsp_filter_check::get_check_id()
}


void sinsp_filter_check::add_filter_value(const char* str, uint32_t len, uint16_t i)
void sinsp_filter_check::add_filter_value(const char* str, uint32_t len, uint32_t i)
{

if (i >= m_val_storages.size())
Expand Down Expand Up @@ -1709,7 +1709,7 @@ void sinsp_filter_compiler::parse_check()
//
// Create the 'or' sequence
//
uint64_t num_values = 0;
uint32_t num_values = 0;
while(true)
{
// 'in' clause aware
Expand Down Expand Up @@ -1762,7 +1762,7 @@ void sinsp_filter_compiler::parse_check()
//
// Create the 'or' sequence
//
uint64_t num_values = 0;
uint32_t num_values = 0;
while(true)
{
// 'in' clause aware
Expand Down
3 changes: 1 addition & 2 deletions userspace/libsinsp/filter_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ struct g_hash_membuf
return std::_Hash_impl::hash(val.first, val.second);
#else
size_t hash = 5381;
for(uint8_t *p = val.first; p-val.first < val.second; p++)
for(uint8_t *p = val.first; (uint32_t)(p-val.first) < val.second; p++)
{
int c = *p;

hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
}
return hash;
Expand Down
2 changes: 1 addition & 1 deletion userspace/libsinsp/filterchecks.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class sinsp_filter_check
// If this check is used by a filter, extract the constant to compare it to
// Doesn't return the field length because the filtering engine can calculate it.
//
void add_filter_value(const char* str, uint32_t len, uint16_t i = 0 );
void add_filter_value(const char* str, uint32_t len, uint32_t i = 0 );
virtual void parse_filter_value(const char* str, uint32_t len, uint8_t *storage, uint32_t storage_len);

//
Expand Down

0 comments on commit 0e31e5f

Please sign in to comment.