浏览代码

Fix attribute placement for debugging functions (#1587)

Joseph Henry 3 年之前
父节点
当前提交
c34325fee7
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      node/Bond.hpp

+ 6 - 0
node/Bond.hpp

@@ -1142,6 +1142,9 @@ class Bond {
 	 *
 	 */
 	void log(const char* fmt, ...)
+#ifdef __GNUC__
+		__attribute__((format(printf, 2, 3)))
+#endif
 	{
 #ifdef ZT_TRACE
 		time_t rawtime;
@@ -1171,6 +1174,9 @@ class Bond {
 	 *
 	 */
 	void debug(const char* fmt, ...)
+#ifdef __GNUC__
+		__attribute__((format(printf, 2, 3)))
+#endif
 	{
 #ifdef ZT_DEBUG
 		time_t rawtime;