Skip to content

Commit

Permalink
Merge pull request #175 from tetengo/compilation_errors
Browse files Browse the repository at this point in the history
Correct compilation errors #174

(cherry picked from commit adce02e)
  • Loading branch information
kaorut committed Jul 31, 2021
1 parent d9f70a3 commit 2471945
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions library/property/test/src/usage_tetengo.property.saveLoad_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void usage_tetengo_property_saveLoad()
{
/* The value cannot be yet obtained from the property set for getting. */
const size_t value_length1 = tetengo_property_propertySet_getString(p_props_for_getting, "foo", NULL, 0);
(void)value_length1;
assert(value_length1 == (size_t)-1);
}

Expand All @@ -60,6 +61,7 @@ void usage_tetengo_property_saveLoad()
{
/* The value cannot be yet obtained from the property set for getting. */
const size_t value_length2 = tetengo_property_propertySet_getString(p_props_for_getting, "foo", NULL, 0);
(void)value_length2;
assert(value_length2 == (size_t)-1);
}

Expand Down
2 changes: 2 additions & 0 deletions library/trie/test/src/usage_tetengo.trie.search_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ void usage_tetengo_trie_search()
{
/* If a perfect-matching key is found, its value is returned. */
const int* const p_found_for_gionbashi = (const int*)tetengo_trie_trie_find(p_trie, "gionbashi");
(void)p_found_for_gionbashi;
assert(p_found_for_gionbashi);
assert(*p_found_for_gionbashi == 5);
}
{
/* If not found, NULL is returned. */
const int* const p_found_for_hanabatachou = (const int*)tetengo_trie_trie_find(p_trie, "hanabatachou");
(void)p_found_for_hanabatachou;
assert(!p_found_for_hanabatachou);
}

Expand Down
4 changes: 2 additions & 2 deletions library/trie/test/src/usage_tetengo.trie.search_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ namespace usage_tetengo::trie

// Searches the trie.
// If a perfect-matching key is found, its value is returned.
const int* const p_found_for_gionbashi = trie_.find("gionbashi");
[[maybe_unused]] const int* const p_found_for_gionbashi = trie_.find("gionbashi");
assert(p_found_for_gionbashi);
assert(*p_found_for_gionbashi == 5);

// If not found, nullptr is returned.
const int* const p_found_for_hanabatachou = trie_.find("hanabatachou");
[[maybe_unused]] const int* const p_found_for_hanabatachou = trie_.find("hanabatachou");
assert(!p_found_for_hanabatachou);

// Creates a subtrie consisting of the elements with the common key prefix.
Expand Down

0 comments on commit 2471945

Please sign in to comment.