]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
PR25394 followup#2: debuginfod casting fixes
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 20 Jan 2020 19:44:15 +0000 (14:44 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 20 Jan 2020 20:03:11 +0000 (15:03 -0500)
Buildbot still reports type warnings in time_t arithmetic.
Explicit (long)er cast pushed as obvious ... or is it? :-)

debuginfod/debuginfod.cxx

index 0637508973930a7df777c4c1896aa0ec15f2a001..b0299a1331303cfa421a9f8d7f93c70ee90fc597 100644 (file)
@@ -2493,7 +2493,7 @@ thread_main_fts_source_paths (void* arg)
       bool rescan_now = false;
       if (last_rescan == 0) // at least one initial rescan is documented even for -t0
         rescan_now = true;
-      if (rescan_s > 0 && (long)now > (long)last_rescan + rescan_s)
+      if (rescan_s > 0 && (long)now > (long)(last_rescan + rescan_s))
         rescan_now = true;
       if (sigusr1 != forced_rescan_count)
         {
@@ -2636,7 +2636,7 @@ thread_main_groom (void* /*arg*/)
       bool groom_now = false;
       if (last_groom == 0) // at least one initial groom is documented even for -g0
         groom_now = true;
-      if (groom_s > 0 && (long)now > (long)last_groom + groom_s)
+      if (groom_s > 0 && (long)now > (long)(last_groom + groom_s))
         groom_now = true;
       if (sigusr2 != forced_groom_count)
         {