Merge branch 'scan-build-fixes' into 'master'

Minor scan-build fixes

See merge request GNOME/glib!1770
This commit is contained in:
Sebastian Dröge 2020-11-24 09:40:34 +00:00
commit d78778cc46
2 changed files with 3 additions and 6 deletions

View File

@ -1526,12 +1526,6 @@ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\
get_localtime_tm (t, &tt);
strftime (dst, sizeof(dst), "%Z", &tt);
/* get current time_t for 20090924 in the local timezone */
tt.tm_sec = 0;
tt.tm_min = 0;
tt.tm_hour = 0;
t = mktime (&tt);
TEST_PRINTF ("%a", "Sat");
TEST_PRINTF ("%A", "Saturday");
TEST_PRINTF ("%b", "Oct");
@ -2390,6 +2384,7 @@ test_adjust_time (void)
g_date_time_unref (dt);
i1 = g_time_zone_adjust_time (tz, G_TIME_TYPE_DAYLIGHT, &u2);
g_assert_cmpint (i1, >=, 0);
g_assert (u == u2);
g_time_zone_unref (tz);

View File

@ -126,6 +126,8 @@ test_far_future_ready_time (void)
n_fds = 0;
n_fds = g_main_context_query (context, priority, &timeout_, NULL, n_fds);
g_assert_cmpint (n_fds, >=, 0);
/* The true timeout in milliseconds doesn't fit into a gint. We definitely
* don't want poll() to block forever:
*/