From: Maxim Mamontov Date: Thu, 1 Sep 2011 10:16:35 +0000 (+0300) Subject: Shut up compiler about printing size_t variable X-Git-Tag: 2.408-alpha~10 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/0efa04fc1be8738fc2e5c683cf9604d5c4603252 Shut up compiler about printing size_t variable --- diff --git a/projects/stargazer/plugins/configuration/sgconfig/parser.cpp b/projects/stargazer/plugins/configuration/sgconfig/parser.cpp index c933b5fe..2a936556 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/parser.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/parser.cpp @@ -63,13 +63,13 @@ answerList->push_back(""); sprintf(s, "", SERVER_VERSION); answerList->push_back(s); -sprintf(s, "", tariffs->Count()); +sprintf(s, "", (unsigned long long)tariffs->Count()); answerList->push_back(s); sprintf(s, "", 2); answerList->push_back(s); -sprintf(s, "", users->Count()); +sprintf(s, "", (unsigned long long)users->Count()); answerList->push_back(s); sprintf(s, "", un); diff --git a/projects/stargazer/plugins/store/files/file_store.cpp b/projects/stargazer/plugins/store/files/file_store.cpp index 890b2b6c..62c2519b 100644 --- a/projects/stargazer/plugins/store/files/file_store.cpp +++ b/projects/stargazer/plugins/store/files/file_store.cpp @@ -1181,10 +1181,10 @@ if (s2.Error()) for (size_t i = 0; i < DIR_NUM; i++) { char dirName[3]; - snprintf(dirName, 3, "U%d", i); + snprintf(dirName, 3, "U%llu", (unsigned long long)i); s.WriteInt(dirName, stat.up[i]); // Classic s2.WriteInt(dirName, stat.up[i]); // New - snprintf(dirName, 3, "D%d", i); + snprintf(dirName, 3, "D%llu", (unsigned long long)i); s.WriteInt(dirName, stat.down[i]); // Classic s2.WriteInt(dirName, stat.down[i]); // New }