Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Add format string literal

Christoph Kornc17229f066ae
diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cpp
index 169e96968..4edf00049 100644
--- a/toonz/sources/common/tsystem/tsystempd.cpp
+++ b/toonz/sources/common/tsystem/tsystempd.cpp
@@ -136,7 +136,7 @@ void TSystem::outputDebug(string s) {
cerr << s << endl;
#endif
#else
- qDebug(s.c_str());
+ qDebug("%s", s.c_str());
#endif
}
diff --git a/toonz/sources/toonzfarm/tfarm/tlog.cpp b/toonz/sources/toonzfarm/tfarm/tlog.cpp
index 4c7578e28..7e14b5687 100644
--- a/toonz/sources/toonzfarm/tfarm/tlog.cpp
+++ b/toonz/sources/toonzfarm/tfarm/tlog.cpp
@@ -91,7 +91,7 @@ void notify(LEVEL level, const QString &msg) {
#else
std::string str = msg.toStdString();
- syslog(Level2XPriority(level), str.c_str());
+ syslog(Level2XPriority(level), "%s", str.c_str());
#endif
}
diff --git a/toonz/sources/toonzlib/tlog.cpp b/toonz/sources/toonzlib/tlog.cpp
index 02a9a6992..fcbf77a28 100644
--- a/toonz/sources/toonzlib/tlog.cpp
+++ b/toonz/sources/toonzlib/tlog.cpp
@@ -92,7 +92,7 @@ void notify(LEVEL level, const std::string &msg) {
DeregisterEventSource(handle);
#else
- syslog(Level2XPriority(level), msg.c_str());
+ syslog(Level2XPriority(level), "%s", msg.c_str());
#endif
}