mirror of https://github.com/djcb/mu.git
fix some compiler warnings
This commit is contained in:
parent
6b8ccff572
commit
2135844e1b
|
@ -140,8 +140,8 @@ Indexer::Private::handler (const std::string& fullpath, struct stat *statbuf,
|
|||
case Scanner::HandleType::File: {
|
||||
|
||||
if ((size_t)statbuf->st_size > max_message_size_) {
|
||||
g_debug ("skip %s (too big: %zu bytes)",
|
||||
fullpath.c_str(), statbuf->st_size);
|
||||
g_debug ("skip %s (too big: %" G_GINT64_FORMAT " bytes)",
|
||||
fullpath.c_str(), (gint64)statbuf->st_size);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,22 +32,22 @@ test_mu_contacts_01()
|
|||
g_assert_true (contacts.empty());
|
||||
g_assert_cmpuint (contacts.size(), ==, 0);
|
||||
|
||||
contacts.add(std::move(Mu::ContactInfo ("Foo <foo.bar@example.com>",
|
||||
"foo.bar@example.com", "Foo", false, 12345)));
|
||||
contacts.add(Mu::ContactInfo ("Foo <foo.bar@example.com>",
|
||||
"foo.bar@example.com", "Foo", false, 12345));
|
||||
g_assert_false (contacts.empty());
|
||||
g_assert_cmpuint (contacts.size(), ==, 1);
|
||||
|
||||
contacts.add(std::move(Mu::ContactInfo ("Cuux <cuux.fnorb@example.com>",
|
||||
"cuux@example.com", "Cuux", false, 54321)));
|
||||
contacts.add(Mu::ContactInfo ("Cuux <cuux.fnorb@example.com>",
|
||||
"cuux@example.com", "Cuux", false, 54321));
|
||||
|
||||
g_assert_cmpuint (contacts.size(), ==, 2);
|
||||
|
||||
contacts.add(std::move(Mu::ContactInfo ("foo.bar@example.com",
|
||||
"foo.bar@example.com", "Foo", false, 77777)));
|
||||
contacts.add(Mu::ContactInfo ("foo.bar@example.com",
|
||||
"foo.bar@example.com", "Foo", false, 77777));
|
||||
g_assert_cmpuint (contacts.size(), ==, 2);
|
||||
|
||||
contacts.add(std::move(Mu::ContactInfo ("Foo.Bar@Example.Com",
|
||||
"Foo.Bar@Example.Com", "Foo", false, 88888)));
|
||||
contacts.add(Mu::ContactInfo ("Foo.Bar@Example.Com",
|
||||
"Foo.Bar@Example.Com", "Foo", false, 88888));
|
||||
g_assert_cmpuint (contacts.size(), ==, 2);
|
||||
// note: replaces first.
|
||||
|
||||
|
|
|
@ -66,10 +66,12 @@ install_sig_handler (void)
|
|||
static void
|
||||
cookie(size_t n)
|
||||
{
|
||||
const auto num{static_cast<unsigned>(n)};
|
||||
|
||||
if (tty) // for testing.
|
||||
::printf ("[%x]", n);
|
||||
::printf ("[%x]", num);
|
||||
else
|
||||
::printf (COOKIE_PRE "%x" COOKIE_POST, n);
|
||||
::printf (COOKIE_PRE "%x" COOKIE_POST, num);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue