From: Uwe Hermann Date: Tue, 6 Jun 2017 09:15:45 +0000 (+0200) Subject: Fix build when using --without-libsigrokdecode. X-Git-Tag: sigrok-cli-0.7.0~4 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3f85a61849759896e0e9b009be14a696108d4309;p=sigrok-cli.git Fix build when using --without-libsigrokdecode. --- diff --git a/session.c b/session.c index 5e096cd..4b55544 100644 --- 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 c93a6be..9491110 100644 --- 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)