summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2010-02-12 13:53:00 +0000
committerdeva <deva>2010-02-12 13:53:00 +0000
commitc44cc1989fe1b4cd94c115fb9a62b73afc46e62f (patch)
tree880523c9e8be8c4c43498faf5c3fe8bdb1798cda
parent305ddf3bdb16177420f480b006550508174a734e (diff)
Fix compiler warnings.
-rw-r--r--server/src/log.cc2
-rw-r--r--server/src/luaresume.cc2
-rw-r--r--server/src/macrotool.cc6
-rw-r--r--server/src/macrotool_dump.cc12
-rw-r--r--server/src/macrotool_fieldnames.cc12
-rw-r--r--server/src/macrotool_filehandler.cc10
-rw-r--r--server/src/macrotool_util.cc2
-rw-r--r--server/src/pracrod.cc6
-rw-r--r--server/src/queryhandlerpentominos.cc8
9 files changed, 30 insertions, 30 deletions
diff --git a/server/src/log.cc b/server/src/log.cc
index 92a77f6..fe72422 100644
--- a/server/src/log.cc
+++ b/server/src/log.cc
@@ -39,5 +39,5 @@
void log(std::string message)
{
syslog(LOG_CONS, // Write to console if error sending to system logger.
- message.c_str());
+ "%s", message.c_str());
}
diff --git a/server/src/luaresume.cc b/server/src/luaresume.cc
index 15377d8..9bf6fd4 100644
--- a/server/src/luaresume.cc
+++ b/server/src/luaresume.cc
@@ -99,7 +99,7 @@ std::string LUAResume::run(std::string program)
return false;
}
- PRACRO_DEBUG("Running %s\n", program.c_str());
+ PRACRO_DEBUG(luaresume, "Running %s\n", program.c_str());
/*
lua_pushstring(L, value.toStdString().c_str());
diff --git a/server/src/macrotool.cc b/server/src/macrotool.cc
index bb8c8fc..40ca845 100644
--- a/server/src/macrotool.cc
+++ b/server/src/macrotool.cc
@@ -117,13 +117,13 @@ int main(int argc, char *argv[])
case '?':
case 'h':
- printf(version_str);
+ printf("%s", version_str);
printf(usage_str, argv[0]);
return 0;
case 'v':
- printf(version_str);
- printf(copyright_str);
+ printf("%s", version_str);
+ printf("%s", copyright_str);
return 0;
default:
diff --git a/server/src/macrotool_dump.cc b/server/src/macrotool_dump.cc
index 66b4ad7..f3f7e42 100644
--- a/server/src/macrotool_dump.cc
+++ b/server/src/macrotool_dump.cc
@@ -292,7 +292,7 @@ static void dump_templates()
void macrotool_dump(std::vector<std::string> params)
{
if(params.size() < 1) {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
@@ -301,7 +301,7 @@ void macrotool_dump(std::vector<std::string> params)
if(params[0] == "fields") {
if(params.size() != 1) {
printf("The command 'fields' doen't take any parameters.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
dump_fields();
@@ -311,7 +311,7 @@ void macrotool_dump(std::vector<std::string> params)
if(params[0] == "macros") {
if(params.size() != 1) {
printf("The command 'macro' doen't take any parameters.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
dump_macros();
@@ -321,7 +321,7 @@ void macrotool_dump(std::vector<std::string> params)
if(params[0] == "templates") {
if(params.size() != 1) {
printf("The command 'templates' doen't take any parameters.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
dump_templates();
@@ -329,11 +329,11 @@ void macrotool_dump(std::vector<std::string> params)
}
if(params[0] == "help") {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
printf("Unknown command '%s'\n", params[0].c_str());
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
diff --git a/server/src/macrotool_fieldnames.cc b/server/src/macrotool_fieldnames.cc
index 1d92df8..3a6e651 100644
--- a/server/src/macrotool_fieldnames.cc
+++ b/server/src/macrotool_fieldnames.cc
@@ -160,7 +160,7 @@ static void list()
void macrotool_fieldnames(std::vector<std::string> params)
{
if(params.size() < 1) {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
@@ -169,7 +169,7 @@ void macrotool_fieldnames(std::vector<std::string> params)
if(params[0] == "list") {
if(params.size() != 1) {
printf("The command 'list' does not need any parameters.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
list();
@@ -179,7 +179,7 @@ void macrotool_fieldnames(std::vector<std::string> params)
if(params[0] == "add") {
if(params.size() != 3) {
printf("The command 'add' needs 2 parameters.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
add(params[1], params[2]);
@@ -189,7 +189,7 @@ void macrotool_fieldnames(std::vector<std::string> params)
if(params[0] == "del") {
if(params.size() != 2) {
printf("The command 'del' needs 1 parameter.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
del(params[1]);
@@ -197,11 +197,11 @@ void macrotool_fieldnames(std::vector<std::string> params)
}
if(params[0] == "help") {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
printf("Unknown command '%s'\n", params[0].c_str());
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
diff --git a/server/src/macrotool_filehandler.cc b/server/src/macrotool_filehandler.cc
index d0245ba..c52921a 100644
--- a/server/src/macrotool_filehandler.cc
+++ b/server/src/macrotool_filehandler.cc
@@ -190,7 +190,7 @@ static void add(std::string file)
void macrotool_filehandler(std::vector<std::string> params)
{
if(params.size() < 1) {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
@@ -199,7 +199,7 @@ void macrotool_filehandler(std::vector<std::string> params)
if(params[0] == "add") {
if(params.size() != 2) {
printf("The command 'add' needs 1 parameter.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
add(params[1]);
@@ -209,7 +209,7 @@ void macrotool_filehandler(std::vector<std::string> params)
if(params[0] == "check") {
if(params.size() != 2) {
printf("The command 'check' needs 1 parameter.\n");
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
check(params[1]);
@@ -217,11 +217,11 @@ void macrotool_filehandler(std::vector<std::string> params)
}
if(params[0] == "help") {
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
printf("Unknown command '%s'\n", params[0].c_str());
- printf(usage_str);
+ printf("%s", usage_str);
return;
}
diff --git a/server/src/macrotool_util.cc b/server/src/macrotool_util.cc
index d6446f7..003e929 100644
--- a/server/src/macrotool_util.cc
+++ b/server/src/macrotool_util.cc
@@ -71,7 +71,7 @@ std::vector<std::string> getTemplates()
void printcolumn(std::string text, size_t width)
{
- printf(text.c_str());
+ printf("%s", text.c_str());
for(size_t i = text.length(); i < width; i++) printf(" ");
printf("\t");
}
diff --git a/server/src/pracrod.cc b/server/src/pracrod.cc
index 75f58a6..d17001c 100644
--- a/server/src/pracrod.cc
+++ b/server/src/pracrod.cc
@@ -202,13 +202,13 @@ int main(int argc, char *argv[])
case '?':
case 'h':
- printf(version_str);
+ printf("%s", version_str);
printf(usage_str, argv[0]);
return 0;
case 'v':
- printf(version_str);
- printf(copyright_str);
+ printf("%s", version_str);
+ printf("%s", copyright_str);
return 0;
default:
diff --git a/server/src/queryhandlerpentominos.cc b/server/src/queryhandlerpentominos.cc
index c52b36c..62a742f 100644
--- a/server/src/queryhandlerpentominos.cc
+++ b/server/src/queryhandlerpentominos.cc
@@ -157,7 +157,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
socket.write(header, strlen(header));
#endif/*WITHOUT_PENTOMINOS*/
- PRACRO_DEBUG(queryhandler, header);
+ PRACRO_DEBUG(queryhandler, "%s", header);
sprintf(buf, " <pentominos:entry replyformat=\"xml\"\n"
" cpr=\"%s\"\n"
@@ -181,7 +181,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
- PRACRO_DEBUG(queryhandler, buf);
+ PRACRO_DEBUG(queryhandler, "%s", buf);
sprintf(buf, " <pentominos:query device_id=\"%s\"\n"
" device_type=\"%s\"\n"
@@ -194,7 +194,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
- PRACRO_DEBUG(queryhandler, buf);
+ PRACRO_DEBUG(queryhandler, "%s", buf);
sprintf(buf, "</artefact>");
@@ -202,7 +202,7 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
socket.write(buf, strlen(buf));
#endif/*WITHOUT_PENTOMINOS*/
- PRACRO_DEBUG(queryhandler, buf);
+ PRACRO_DEBUG(queryhandler, "%s", buf);
QueryResult result;