projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f82d1b
)
Fix potentially ambiguous printf()
author
Robin Gareus
<robin@gareus.org>
Thu, 23 Nov 2017 09:12:34 +0000
(10:12 +0100)
committer
Robin Gareus
<robin@gareus.org>
Thu, 23 Nov 2017 09:12:34 +0000
(10:12 +0100)
Not a real issue, since it's just supposed to be some unique number.
but still.
Reported by PVS-Studio - https://www.viva64.com/en/b/0540/
gtk2_ardour/luawindow.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/luawindow.cc
b/gtk2_ardour/luawindow.cc
index 89a1d387aa490cfdb1ea058c80a803842d8d1cfc..4e02cd2b20a15940ad593470a57aa78dab1e110c 100644
(file)
--- a/
gtk2_ardour/luawindow.cc
+++ b/
gtk2_ardour/luawindow.cc
@@
-483,11
+483,12
@@
LuaWindow::save_script ()
// 5) construct filename -- TODO ask user for name, ask to replace file.
do {
+ char tme[80];
char buf[80];
time_t t = time(0);
struct tm * timeinfo = localtime (&t);
- strftime (
buf, sizeof(buf), "%s%d
", timeinfo);
- s
printf (buf, "%s%ld", buf, random ()); // is this valid?
+ strftime (
tme, sizeof(tme), "%s
", timeinfo);
+ s
nprintf (buf, sizeof(buf), "%s%ld", tme, random ());
MD5 md5;
std::string fn = md5.digestString (buf);