]> sigrok.org Git - libsigrok.git/blobdiff - output/output_binary.c
sr/srd: Fix left-over #includes.
[libsigrok.git] / output / output_binary.c
index f542958554c50aa7bdaaf7fe5b26153c95d2f93e..039d10bcea3d09428fafc29cc47ea2c39466ffa6 100644 (file)
@@ -21,7 +21,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <glib.h>
-#include <sigrok.h>
+#include "sigrok.h"
+#include "sigrok-internal.h"
 #include "config.h"
 
 static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
@@ -30,25 +31,25 @@ static int data(struct sr_output *o, const char *data_in, uint64_t length_in,
        char *outbuf;
 
        /* Prevent compiler warnings. */
-       o = o;
+       (void)o;
 
        if (!data_in) {
-               g_warning("binary output: %s: data_in was NULL", __func__);
+               sr_warn("binary output: %s: data_in was NULL", __func__);
                return SR_ERR;
        }
 
        if (!length_out) {
-               g_warning("binary output: %s: length_out was NULL", __func__);
+               sr_warn("binary output: %s: length_out was NULL", __func__);
                return SR_ERR;
        }
 
        if (length_in == 0) {
-               g_warning("binary output: %s: length_in was 0", __func__);
+               sr_warn("binary output: %s: length_in was 0", __func__);
                return SR_ERR;
        }
 
        if (!(outbuf = calloc(1, length_in))) {
-               g_warning("binary output: %s: outbuf calloc failed", __func__);
+               sr_warn("binary output: %s: outbuf calloc failed", __func__);
                return SR_ERR_MALLOC;
        }