diff --git a/client-src/amandates.c b/client-src/amandates.c index f8bb770994..8f77cba413 100644 --- a/client-src/amandates.c +++ b/client-src/amandates.c @@ -265,15 +265,15 @@ enter_record( if (level < 0 || level >= DUMP_LEVELS) { qname = quote_string(name); /* this is not allowed, but we can ignore it */ - dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld\n"), - qname, level, (long) dumpdate); + dbprintf(_("amandates botch: %s lev %d: new dumpdate %lld\n"), + qname, level, (long long) dumpdate); amfree(qname); return; } else if(dumpdate < amdp->dates[level]) { qname = quote_string(name); /* this is not allowed, but we can ignore it */ - dbprintf(_("amandates botch: %s lev %d: new dumpdate %ld old %ld\n"), - qname, level, (long) dumpdate, (long) amdp->dates[level]); + dbprintf(_("amandates botch: %s lev %d: new dumpdate %lld old %lld\n"), + qname, level, (long long) dumpdate, (long long) amdp->dates[level]); amfree(qname); return; } @@ -298,15 +298,15 @@ amandates_updateone( if (level < 0 || level >= DUMP_LEVELS) { /* this is not allowed, but we can ignore it */ qname = quote_string(name); - dbprintf(_("amandates updateone: %s lev %d: bad level, dumpdate %ld"), - name, level, (long) dumpdate); + dbprintf(_("amandates updateone: %s lev %d: bad level, dumpdate %lld"), + name, level, (long long) dumpdate); amfree(qname); return; } else if (dumpdate < amdp->dates[level]) { /* this is not allowed, but we can ignore it */ qname = quote_string(name); - dbprintf(_("amandates updateone: %s lev %d: new dumpdate %ld old %ld"), - name, level, (long) dumpdate, (long) amdp->dates[level]); + dbprintf(_("amandates updateone: %s lev %d: new dumpdate %lld old %lld"), + name, level, (long long) dumpdate, (long long) amdp->dates[level]); amfree(qname); return; } diff --git a/client-src/client_util.c b/client-src/client_util.c index dd333bedbd..84901759d3 100644 --- a/client-src/client_util.c +++ b/client-src/client_util.c @@ -1392,7 +1392,7 @@ run_calcsize( pid_t calcpid; times_t start_time; FILE *dumpout = NULL; - int dumpsince; + time_t dumpsince; char *errmsg = NULL; char *line = NULL; amwait_t wait_status; @@ -1454,7 +1454,7 @@ run_calcsize( } g_snprintf(number, sizeof(number), "%d", level); g_ptr_array_add(argv_ptr, g_strdup(number)); - g_snprintf(number, sizeof(number), "%d", dumpsince); + g_snprintf(number, sizeof(number), "%lld", (long long)dumpsince); g_ptr_array_add(argv_ptr, g_strdup(number)); } diff --git a/client-src/sendsize.c b/client-src/sendsize.c index 02c2e74338..08128ac090 100644 --- a/client-src/sendsize.c +++ b/client-src/sendsize.c @@ -1130,7 +1130,7 @@ generic_calc_estimates( g_ptr_array_add(argv_ptr, g_strdup(number)); dbprintf(" %s", number); g_snprintf(number, sizeof(number), - "%ld", (long)est->est[level].dumpsince); + "%lld", (long long)est->est[level].dumpsince); g_ptr_array_add(argv_ptr, g_strdup(number)); dbprintf(" %s", number); } diff --git a/common-src/shm-ring.c b/common-src/shm-ring.c index 1ec3195044..7a85582414 100644 --- a/common-src/shm-ring.c +++ b/common-src/shm-ring.c @@ -200,7 +200,7 @@ cleanup_shm_ring(void) r = glob("AMANDA_GLOB", GLOB_NOSORT, NULL, &globbuf); if (r == 0) { - int one_day_old = time(NULL) - 60*60*24; + time_t one_day_old = time(NULL) - 60*60*24; for (aglob = globbuf.gl_pathv; *aglob != NULL; aglob++) { if (!g_hash_table_lookup(names, *aglob)) { struct stat statbuf; diff --git a/device-src/s3.c b/device-src/s3.c index 1b4cf10971..22ad98c0d6 100644 --- a/device-src/s3.c +++ b/device-src/s3.c @@ -731,7 +731,7 @@ rfc3339_date( waitpid(pid, NULL, 0); break; } - return atoi(buf); + return atoll(buf); } } } diff --git a/ndmp-src/ndma_cops_backreco.c b/ndmp-src/ndma_cops_backreco.c index 53f7281196..1bb03589e7 100644 --- a/ndmp-src/ndma_cops_backreco.c +++ b/ndmp-src/ndma_cops_backreco.c @@ -411,7 +411,7 @@ ndmca_monitor_recover (struct ndm_session *sess) ndmp9_data_state ds; ndmp9_mover_state ms; char *estb; - int last_state_print = 0; + time_t last_state_print = 0; if (ca->job.tape_tcp) { return (ndmca_monitor_recover_tape_tcp(sess)); @@ -578,7 +578,7 @@ ndmca_monitor_recover_tape_tcp (struct ndm_session *sess) int count; ndmp9_data_state ds; char *estb; - int last_state_print = 0; + time_t last_state_print = 0; ndmalogf (sess, 0, 3, "Monitoring recover"); @@ -1060,7 +1060,7 @@ ndmca_mon_wait_for_something (struct ndm_session *sess, int max_delay_secs) { struct ndm_control_agent *ca = &sess->control_acb; int delta, notices; - int time_ref = time(0) + max_delay_secs; + time_t time_ref = time(0) + max_delay_secs; ndmalogf (sess, 0, 5, "mon_wait_for_something() entered");