From 0efa04fc1be8738fc2e5c683cf9604d5c4603252 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 1 Sep 2011 13:16:35 +0300 Subject: [PATCH] Shut up compiler about printing size_t variable --- projects/stargazer/plugins/configuration/sgconfig/parser.cpp | 4 ++-- projects/stargazer/plugins/store/files/file_store.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 } -- 2.44.2