]> sigrok.org Git - libsigrokdecode.git/blobdiff - exception.c
tests: Do not reference parent directory in includes
[libsigrokdecode.git] / exception.c
index 8f15ff22a520550a519dfb343d30ad8b2826933e..8810304aac6090d580abc41057320f89fc1566ba 100644 (file)
@@ -17,9 +17,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include "libsigrokdecode.h"
-#include "config.h"
 #include <stdarg.h>
 #include <glib.h>
 #include <frameobject.h> /* Python header not pulled in by default. */
@@ -62,7 +62,7 @@ SRD_PRIV void srd_exception_catch(const char *format, ...)
        py_str_as_str(py_str, &str);
        g_string_append(msg, str);
        Py_DecRef(py_str);
-       srd_err(msg->str);
+       srd_err("%s", msg->str);
 
        /* Send a more precise error location to srd_dbg(), if we have it. */
        if (etb && etb != Py_None) {
@@ -75,7 +75,7 @@ SRD_PRIV void srd_exception_catch(const char *format, ...)
                py_str_as_str(py_str, &tracestr);
                Py_DecRef(py_str);
                g_string_printf(msg, "%s in %s: %s", ename, tracestr, str);
-               srd_dbg(msg->str);
+               srd_dbg("%s", msg->str);
                g_free(tracestr);
        }
        g_free(str);