Fix format string use.

This commit is contained in:
joerg 2013-11-29 23:02:26 +00:00
parent e4c0f6ad28
commit 616728154a
5 changed files with 7 additions and 7 deletions

View File

@ -86,6 +86,6 @@ void Log::log(Logger::log_level_t level, const std::string & msg)
void StdoutLogger::_log(const char * msg) void StdoutLogger::_log(const char * msg)
{ {
printf(msg); printf("%s", msg);
} }

View File

@ -1201,7 +1201,7 @@ void SectionMatchListASTNode::printTree(int indent) const
} }
printIndent(indent+1); printIndent(indent+1);
printf("source: ", m_source->c_str()); printf("source: ");
if (m_source) if (m_source)
{ {
printf("%s\n", m_source->c_str()); printf("%s\n", m_source->c_str());
@ -1283,7 +1283,7 @@ void SymbolASTNode::printTree(int indent) const
printf("%s(", nodeName().c_str()); printf("%s(", nodeName().c_str());
if (source) if (source)
{ {
printf(source); printf("%s", source);
} }
else else
{ {
@ -1292,7 +1292,7 @@ void SymbolASTNode::printTree(int indent) const
printf(":"); printf(":");
if (symbol) if (symbol)
{ {
printf(symbol); printf("%s", symbol);
} }
else else
{ {

View File

@ -317,7 +317,7 @@ public:
void printUsage(Options & options) void printUsage(Options & options)
{ {
options.usage(std::cout, "files..."); options.usage(std::cout, "files...");
printf(k_usageText, k_toolName); printf("%s", k_usageText);
} }
/*! /*!

View File

@ -177,7 +177,7 @@ public:
void printUsage(Options & options) void printUsage(Options & options)
{ {
options.usage(std::cout, "key-files..."); options.usage(std::cout, "key-files...");
printf(k_usageText, k_toolName); printf("%s", k_usageText);
} }
/*! /*!

View File

@ -212,7 +212,7 @@ public:
void printUsage(Options & options) void printUsage(Options & options)
{ {
options.usage(std::cout, "sb-file"); options.usage(std::cout, "sb-file");
printf(k_usageText, k_toolName); printf("%s", k_usageText);
} }
/*! /*!