]> sigrok.org Git - sigrok-cli.git/commitdiff
Fix build when using --without-libsigrokdecode.
authorUwe Hermann <redacted>
Tue, 6 Jun 2017 09:15:45 +0000 (11:15 +0200)
committerUwe Hermann <redacted>
Tue, 6 Jun 2017 09:15:45 +0000 (11:15 +0200)
session.c
show.c

index 5e096cd32f39d5e7edc9be45a87f9d8e81ba8f50..4b55544c610eac954c7427a37938d4b2db12504b 100644 (file)
--- a/session.c
+++ b/session.c
@@ -175,6 +175,10 @@ void datafeed_in(const struct sr_dev_inst *sdi,
        uint64_t input_len;
        struct sr_dev_driver *driver;
 
+       /* Avoid warnings when building without decoder support. */
+       (void)session;
+       (void)input_len;
+
        driver = sr_dev_inst_driver_get(sdi);
 
        /* If the first packet to come in isn't a header, don't even try. */
diff --git a/show.c b/show.c
index c93a6be4c8c397bf7096857880bb17b9c6963f3e..9491110bdcfdbb82d1c0f469a02e47d043fb0875 100644 (file)
--- a/show.c
+++ b/show.c
@@ -94,6 +94,7 @@ void show_version(void)
        printf("  - SCPI backends: %s.\n", str);
        g_free(str);
 
+#ifdef HAVE_SRD
        printf("- libsigrokdecode %s/%s (rt: %s/%s).\n",
                SRD_PACKAGE_VERSION_STRING, SRD_LIB_VERSION_STRING,
                srd_package_version_string_get(), srd_lib_version_string_get());
@@ -116,6 +117,7 @@ void show_version(void)
        str = srd_buildinfo_host_get();
        printf("  - Host: %s.\n", str);
        g_free(str);
+#endif
 }
 
 void show_supported(void)