]> git.stg.codes - stg.git/commitdiff
Shut up compiler about printing size_t variable
authorMaxim Mamontov <faust.madf@gmail.com>
Thu, 1 Sep 2011 10:16:35 +0000 (13:16 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Thu, 1 Sep 2011 10:16:35 +0000 (13:16 +0300)
projects/stargazer/plugins/configuration/sgconfig/parser.cpp
projects/stargazer/plugins/store/files/file_store.cpp

index c933b5fee72f657d3fd8816a9bc6a94f330e010c..2a9365569b49282003985540cf82507964fac22f 100644 (file)
@@ -63,13 +63,13 @@ answerList->push_back("<ServerInfo>");
 sprintf(s, "<version value=\"%s\"/>", SERVER_VERSION);
 answerList->push_back(s);
 
-sprintf(s, "<tariff_num value=\"%u\"/>", tariffs->Count());
+sprintf(s, "<tariff_num value=\"%llu\"/>", (unsigned long long)tariffs->Count());
 answerList->push_back(s);
 
 sprintf(s, "<tariff value=\"%d\"/>", 2);
 answerList->push_back(s);
 
-sprintf(s, "<users_num value=\"%u\"/>", users->Count());
+sprintf(s, "<users_num value=\"%llu\"/>", (unsigned long long)users->Count());
 answerList->push_back(s);
 
 sprintf(s, "<uname value=\"%s\"/>", un);
index 890b2b6c107eb49c93721b9f39670cdeacfbf2be..62c2519b976a343cdf88fe59847b93dbcc89623b 100644 (file)
@@ -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
     }