From 20321673ce2705b683e296764a527973a799049d Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Mon, 28 Mar 2022 01:02:52 -0700 Subject: [PATCH] Resolve new GCC warnings --- src/sbbs3/atcodes.cpp | 4 ++-- src/sbbs3/getstats.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp index 3ffb2ed415..a720d7b241 100644 --- a/src/sbbs3/atcodes.cpp +++ b/src/sbbs3/atcodes.cpp @@ -1716,11 +1716,11 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool else if(!strcmp(sp,"ULS")) safe_snprintf(str,maxlen,"%lu", (ulong)stats.uls); else if(!strcmp(sp,"ULB")) - safe_snprintf(str,maxlen,"%" PRIu32, stats.ulb); + safe_snprintf(str,maxlen,"%" PRIu64, stats.ulb); else if(!strcmp(sp,"DLS")) safe_snprintf(str,maxlen,"%lu", (ulong)stats.dls); else if(!strcmp(sp,"DLB")) - safe_snprintf(str,maxlen,"%" PRIu32, stats.dlb); + safe_snprintf(str,maxlen,"%" PRIu64, stats.dlb); else if(!strcmp(sp,"PTODAY")) safe_snprintf(str,maxlen,"%lu", (ulong)stats.ptoday); else if(!strcmp(sp,"ETODAY")) diff --git a/src/sbbs3/getstats.c b/src/sbbs3/getstats.c index f3f7a68532..b54f41559f 100644 --- a/src/sbbs3/getstats.c +++ b/src/sbbs3/getstats.c @@ -271,7 +271,7 @@ BOOL fwrite_cstats(FILE* fp, const stats_t* stats) ); if(len >= sizeof(pad)) return FALSE; - if(fprintf(fp, "%.*s\n", sizeof(pad) - (len + 1), pad) <= 0) + if(fprintf(fp, "%.*s\n", (int)(sizeof(pad) - (len + 1)), pad) <= 0) return FALSE; } len = fprintf(fp @@ -290,7 +290,7 @@ BOOL fwrite_cstats(FILE* fp, const stats_t* stats) ); if(len >= sizeof(pad)) return FALSE; - return fprintf(fp, "%.*s\n", sizeof(pad) - (len + 1), pad) > 0; + return fprintf(fp, "%.*s\n", (int)(sizeof(pad) - (len + 1)), pad) > 0; } /****************************************************************************/ -- GitLab