瀏覽代碼

core: tmrec fix build warning introduced at dd6339f817822cd0590aec2a9a467330bde499dd

> core/utils/tmrec.c: In function 'ac_print':
> core/utils/tmrec.c:275:32: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'long unsigned int' [-Wformat=]
>   275 |         printf("\nSys time: %llu\nTime: %02d:%02d:%02d\n", (uint64_t)_atp->time,
>       |                             ~~~^                           ~~~~~~~~~~~~~~~~~~~~
>       |                                |                           |
>       |                                long long unsigned int      long unsigned int
>       |                             %lu
Victor Seva 2 年之前
父節點
當前提交
ebfacdb7d7
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      src/core/utils/tmrec.c

+ 5 - 5
src/core/utils/tmrec.c

@@ -272,7 +272,7 @@ int ac_print(ac_tm_t *_atp)
 		return -1;
 	}
 
-	printf("\nSys time: %llu\nTime: %02d:%02d:%02d\n", (uint64_t)_atp->time,
+	printf("\nSys time: %lu\nTime: %02d:%02d:%02d\n", (uint64_t)_atp->time,
 				_atp->t.tm_hour, _atp->t.tm_min, _atp->t.tm_sec);
 	printf("Date: %s, %04d-%02d-%02d\n", _wdays[_atp->t.tm_wday],
 				_atp->t.tm_year+1900, _atp->t.tm_mon+1, _atp->t.tm_mday);
@@ -512,15 +512,15 @@ int tr_print(tmrec_t *_trp)
 		return -1;
 	}
 	printf("Recurrence definition\n-- start time ---\n");
-	printf("Sys time: %llu\n", (uint64_t)_trp->dtstart);
+	printf("Sys time: %lu\n", (uint64_t)_trp->dtstart);
 	printf("Time: %02d:%02d:%02d\n", _trp->ts.tm_hour,
 				_trp->ts.tm_min, _trp->ts.tm_sec);
 	printf("Date: %s, %04d-%02d-%02d\n", _wdays[_trp->ts.tm_wday],
 				_trp->ts.tm_year+1900, _trp->ts.tm_mon+1, _trp->ts.tm_mday);
 	printf("---\n");
-	printf("End time: %llu\n", (uint64_t)_trp->dtend);
-	printf("Duration: %llu\n", (uint64_t)_trp->duration);
-	printf("Until: %llu\n", (uint64_t)_trp->until);
+	printf("End time: %lu\n", (uint64_t)_trp->dtend);
+	printf("Duration: %lu\n", (uint64_t)_trp->duration);
+	printf("Until: %lu\n", (uint64_t)_trp->until);
 	printf("Freq: %d\n", (int)_trp->freq);
 	printf("Interval: %d\n", (int)_trp->interval);
 	if(_trp->byday)