Skip to content

Commit

Permalink
Fix more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed Aug 12, 2024
1 parent 5eab776 commit dda6ad7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/api/src/APITests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void define_variable_attributes(int file_id, std::string const& variable_
variable_name_ptr.get(),
attribute_name_ptr.get(),
&attribute_values[0],
attribute_values.size());
static_cast<int>(attribute_values.size()));
ASSERT_EQ(ugridapi::UGridioApiErrors::Success, error_code);
}

Expand All @@ -43,7 +43,7 @@ static void define_variable_attributes(int file_id, std::string const& variable_
variable_name_ptr.get(),
attribute_name_ptr.get(),
&attribute_values[0],
attribute_values.size());
static_cast<int>(attribute_values.size()));
ASSERT_EQ(ugridapi::UGridioApiErrors::Success, error_code);
}

Expand All @@ -64,7 +64,7 @@ static void define_variable_attributes(int file_id, std::string const& variable_
variable_name_ptr.get(),
attribute_name_ptr.get(),
attribute_value.c_str(),
attribute_value.length());
static_cast<int>(attribute_value.length()));
ASSERT_EQ(ugridapi::UGridioApiErrors::Success, error_code);
}

Expand All @@ -78,7 +78,10 @@ static void define_global_attributes(int file_id, std::string const& attribute_n
std::unique_ptr<char[]> const attribute_name_ptr(new char[name_long_length]);
string_to_char_array(attribute_name, name_long_length, attribute_name_ptr.get());

error_code = ugridapi::ug_attribute_global_char_define(file_id, attribute_name_ptr.get(), attribute_value.c_str(), attribute_value.length());
error_code = ugridapi::ug_attribute_global_char_define(file_id,
attribute_name_ptr.get(),
attribute_value.c_str(),
static_cast<int>(attribute_value.length()));
ASSERT_EQ(ugridapi::UGridioApiErrors::Success, error_code);
}

Expand Down

0 comments on commit dda6ad7

Please sign in to comment.