]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4563] Fix clang compiler warnings
authorThomas Markwalder <tmark@isc.org>
Mon, 29 Jun 2026 17:38:04 +0000 (13:38 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 1 Jul 2026 15:49:50 +0000 (15:49 +0000)
modified:   src/hooks/dhcp/forensic_log/rotating_file.cc

src/hooks/dhcp/forensic_log/rotating_file.cc

index 4f9b553fe01f525e1f1756bf859ff15bca16f24e..6d6986d216650a7050a736a13b174d06771febbd 100644 (file)
@@ -233,7 +233,7 @@ RotatingFile::useExistingFiles(struct tm& time_info) {
             return;
         }
         time_t current_timestamp = mktime(&time_info);
-        if (current_timestamp < (file_timestamp + count_)) {
+        if (current_timestamp < (file_timestamp + static_cast<time_t>(count_))) {
             localtime_r(&file_timestamp, &time_info);
         } else {
             file.clear();
@@ -329,7 +329,7 @@ RotatingFile::rotate() {
     if (!isOpen()) {
         rotate_file = true;
     } else if (time_unit_ == TimeUnit::Second) {
-        if (count_ <= (timestamp - timestamp_)) {
+        if (static_cast<time_t>(count_) <= (timestamp - timestamp_)) {
             rotate_file = true;
         }
     } else if (time_unit_ == TimeUnit::Day) {