mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-30 12:54:11 +02:00
Merge branch 'wfloat-conversion' into 'main'
build: Enable -Wfloat-conversion and fix warnings See merge request GNOME/glib!4126
This commit is contained in:
@@ -1537,7 +1537,7 @@ g_task_thread_setup (void)
|
||||
if (tasks_running == G_TASK_POOL_SIZE)
|
||||
task_wait_time = G_TASK_WAIT_TIME_BASE;
|
||||
else if (tasks_running > G_TASK_POOL_SIZE && tasks_running < G_TASK_WAIT_TIME_MAX_POOL_SIZE)
|
||||
task_wait_time *= G_TASK_WAIT_TIME_MULTIPLIER;
|
||||
task_wait_time = (guint64) (task_wait_time * G_TASK_WAIT_TIME_MULTIPLIER);
|
||||
|
||||
if (tasks_running >= G_TASK_POOL_SIZE)
|
||||
g_source_set_ready_time (task_pool_manager, g_get_monotonic_time () + task_wait_time);
|
||||
@@ -1562,7 +1562,7 @@ g_task_thread_cleanup (void)
|
||||
g_source_set_ready_time (task_pool_manager, -1);
|
||||
|
||||
if (tasks_running > G_TASK_POOL_SIZE && tasks_running < G_TASK_WAIT_TIME_MAX_POOL_SIZE)
|
||||
task_wait_time /= G_TASK_WAIT_TIME_MULTIPLIER;
|
||||
task_wait_time = (guint64) (task_wait_time / G_TASK_WAIT_TIME_MULTIPLIER);
|
||||
|
||||
tasks_running--;
|
||||
|
||||
|
@@ -30,7 +30,8 @@
|
||||
|
||||
struct {
|
||||
const char *order;
|
||||
int expected, seen;
|
||||
gdouble expected;
|
||||
unsigned int seen;
|
||||
} ordering[] = {
|
||||
/* There are 32 legitimate orderings; the result always has to start
|
||||
* with either "fe" (usually) or "ef" (rarely). For the remaining
|
||||
@@ -141,8 +142,8 @@ test_srv_target_ordering (void)
|
||||
*/
|
||||
for (o = 0; o < NUM_ORDERINGS; o++)
|
||||
{
|
||||
g_assert_cmpint (ordering[o].seen, >, ordering[o].expected / 2);
|
||||
g_assert_cmpint (ordering[o].seen, <, ordering[o].expected * 2);
|
||||
g_assert_cmpuint (ordering[o].seen, >, (guint64) (ordering[o].expected / 2));
|
||||
g_assert_cmpuint (ordering[o].seen, <, (guint64) (ordering[o].expected * 2));
|
||||
}
|
||||
|
||||
g_resolver_free_targets (targets);
|
||||
|
Reference in New Issue
Block a user