summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorDaniel Elstner <daniel.kitta@gmail.com>2015-09-13 21:32:27 +0200
committerDaniel Elstner <daniel.kitta@gmail.com>2015-09-13 21:32:27 +0200
commitfd4918101e0878be9d399a344511253f5867a646 (patch)
tree4979db79a74b07692cedd34589ba01771958b6fb /log.c
parent9fb7e7fe2c7edafdeedf1976d1723ffe557c8a7c (diff)
downloadlibsigrokdecode-fd4918101e0878be9d399a344511253f5867a646.tar.gz
libsigrokdecode-fd4918101e0878be9d399a344511253f5867a646.zip
log: Enable varargs format warnings
Decorate srd_log() with the GCC format printf attribute so that the compiler can check the format string and arguments for consistency. Also remove the srd_err(), sr_warn(), etc. functions and replace them with macro wrappers around srd_log().
Diffstat (limited to 'log.c')
-rw-r--r--log.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/log.c b/log.c
index d9030c2..f2ef818 100644
--- a/log.c
+++ b/log.c
@@ -181,69 +181,4 @@ SRD_PRIV int srd_log(int loglevel, const char *format, ...)
return ret;
}
-/** @private */
-SRD_PRIV int srd_spew(const char *format, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, format);
- ret = srd_log_cb(srd_log_cb_data, SRD_LOG_SPEW, format, args);
- va_end(args);
-
- return ret;
-}
-
-/** @private */
-SRD_PRIV int srd_dbg(const char *format, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, format);
- ret = srd_log_cb(srd_log_cb_data, SRD_LOG_DBG, format, args);
- va_end(args);
-
- return ret;
-}
-
-/** @private */
-SRD_PRIV int srd_info(const char *format, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, format);
- ret = srd_log_cb(srd_log_cb_data, SRD_LOG_INFO, format, args);
- va_end(args);
-
- return ret;
-}
-
-/** @private */
-SRD_PRIV int srd_warn(const char *format, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, format);
- ret = srd_log_cb(srd_log_cb_data, SRD_LOG_WARN, format, args);
- va_end(args);
-
- return ret;
-}
-
-/** @private */
-SRD_PRIV int srd_err(const char *format, ...)
-{
- int ret;
- va_list args;
-
- va_start(args, format);
- ret = srd_log_cb(srd_log_cb_data, SRD_LOG_ERR, format, args);
- va_end(args);
-
- return ret;
-}
-
/** @} */