Skip to content

Commit 9478f6a

Browse files
committed
Avoid potential format-error and set watchdog
1 parent de90920 commit 9478f6a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

skyscraper.pro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ unix {
1616
}
1717
}
1818

19+
*-g++* {
20+
QMAKE_CXXFLAGS += -Werror=format-security
21+
}
22+
1923
# Installation prefix path for bin/Skyscraper and etc/skyscraper/*
2024
PREFIX=$$(PREFIX)
2125
# One time set with "PREFIX=/path/to qmake"?

src/nocolor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void printVA(int nvargs, const char *fmt, ...) {
8484
}
8585
}
8686
}
87-
printf(fmtPlain.toStdString().c_str());
87+
printf("%s", fmtPlain.toStdString().c_str());
8888
} else {
8989
va_start(args, fmt);
9090
vprintf(fmt, args);

0 commit comments

Comments
 (0)