]> sigrok.org Git - sigrok-cli.git/commitdiff
Fix more warnings when building without libsigrokdecode.
authorUwe Hermann <redacted>
Tue, 28 Jan 2014 14:55:24 +0000 (15:55 +0100)
committerUwe Hermann <redacted>
Tue, 28 Jan 2014 14:55:24 +0000 (15:55 +0100)
device.c
session.c
show.c

index a7dfe62d57166a08eb40aae5fc81e8f43f6d5eba..cfd456609f30bf63ec333d9d178cb4eb580e5958 100644 (file)
--- a/device.c
+++ b/device.c
@@ -20,6 +20,7 @@
 #include "sigrok-cli.h"
 #include "config.h"
 #include <glib.h>
+#include <string.h>
 
 extern struct sr_context *sr_ctx;
 extern gchar *opt_drv;
index 82efee0729ce214bc4e9dab8cba00b53b00a2c53..9441f5da1865f86992e783056296f1f116b656dd 100644 (file)
--- a/session.c
+++ b/session.c
@@ -21,6 +21,8 @@
 #include "config.h"
 #include <glib.h>
 #include <glib/gstdio.h>
+#include <string.h>
+#include <stdlib.h>
 
 static struct sr_output_format *output_format = NULL;
 static int default_output_format = FALSE;
@@ -173,7 +175,10 @@ void datafeed_in(const struct sr_dev_inst *sdi,
        GSList *l;
        GString *out;
        int sample_size, ret;
-       uint64_t samplerate, output_len, filter_out_len, end_sample;
+       uint64_t samplerate, output_len, filter_out_len;
+#ifdef HAVE_SRD
+       uint64_t end_sample;
+#endif
        uint8_t *output_buf, *filter_out;
 
        (void) cb_data;
diff --git a/show.c b/show.c
index e1a5bad6cbb59981b1028953121c6046a3617c78..ee140374ab02500273483cebf2717ae9d8678eab 100644 (file)
--- a/show.c
+++ b/show.c
@@ -20,6 +20,7 @@
 #include "sigrok-cli.h"
 #include "config.h"
 #include <glib.h>
+#include <string.h>
 
 extern gint opt_loglevel;
 extern gchar *opt_pds;