summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authormeme <meme@users.noreply.github.com>2019-10-09 20:15:28 -0400
committerJordan <jordan@psifertex.com>2019-10-16 14:32:01 -0400
commitae342d63609b706fe2b0d58695c3ae2043f4667c (patch)
treea0fc9499dd99453495a4c935b84a4ff228a4152b /binaryninjaapi.h
parentdc5e614df6d150ef8bfae6d65fd82d45623aa8b6 (diff)
Add `printf` annotation
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 1728774d..a1233412 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -585,6 +585,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+ __attribute__ ((format (printf, 2, 3)))
+#endif
void Log(BNLogLevel level, const char* fmt, ...);
/*! LogDebug only writes text to the error console if the console is set to log level: DebugLog
@@ -593,6 +596,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void LogDebug(const char* fmt, ...);
/*! LogInfo always writes text to the error console, and corresponds to the log level: InfoLog.
@@ -601,6 +607,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void LogInfo(const char* fmt, ...);
/*! LogWarn writes text to the error console including a warning icon,
@@ -609,6 +618,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void LogWarn(const char* fmt, ...);
/*! LogError writes text to the error console and pops up the error console. Additionall,
@@ -617,6 +629,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void LogError(const char* fmt, ...);
/*! LogAlert pops up a message box displaying the alert message and logs to the error console.
@@ -625,6 +640,9 @@ namespace BinaryNinja
\param fmt C-style format string.
\param ... Variable arguments corresponding to the format string.
*/
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)))
+#endif
void LogAlert(const char* fmt, ...);
void LogToStdout(BNLogLevel minimumLevel);