test-mu-query: avoid compiler warning

This commit is contained in:
Dirk-Jan C. Binnema
2021-01-27 20:17:20 +02:00
parent c8ab816b37
commit 1b3fd722ef

View File

@ -88,7 +88,7 @@ assert_no_dups (const QueryResults& qres)
/* note: this also *moves the iter* */ /* note: this also *moves the iter* */
static guint static size_t
run_and_count_matches (const std::string& xpath, const std::string& expr, run_and_count_matches (const std::string& xpath, const std::string& expr,
Mu::QueryFlags flags = Mu::QueryFlags::None) Mu::QueryFlags flags = Mu::QueryFlags::None)
{ {
@ -106,15 +106,7 @@ run_and_count_matches (const std::string& xpath, const std::string& expr,
g_assert_true (!!qres); g_assert_true (!!qres);
assert_no_dups (*qres); assert_no_dups (*qres);
int count1{0}; return qres->size();
for (auto&& it: *qres) ++count1;
int count2{0};
for (auto&& it: *qres) ++count2;
g_assert_cmpuint (count1, ==, count2);
return count1;
} }
typedef struct { typedef struct {
@ -250,9 +242,6 @@ test_mu_query_logic (void)
static void static void
test_mu_query_accented_chars_01 (void) test_mu_query_accented_chars_01 (void)
{ {
GError *err;
gchar *summ;
Store store{DB_PATH1}; Store store{DB_PATH1};
Query q{store}; Query q{store};
@ -271,7 +260,7 @@ test_mu_query_accented_chars_01 (void)
"Greetings from Lothlórien"); "Greetings from Lothlórien");
/* TODO: fix this again */ /* TODO: fix this again */
summ = mu_str_summarize (mu_msg_get_body_text auto summ = mu_str_summarize (mu_msg_get_body_text
(msg, MU_MSG_OPTION_NONE), 5); (msg, MU_MSG_OPTION_NONE), 5);
g_assert_cmpstr (summ,==, g_assert_cmpstr (summ,==,
"Let's write some fünkÿ text using umlauts. Foo."); "Let's write some fünkÿ text using umlauts. Foo.");