]> sigrok.org Git - libsigrok.git/blobdiff - src/input/vcd.c
input/vcd: silence printf() format compiler warning
[libsigrok.git] / src / input / vcd.c
index fb25f10aae0a9c667378e973ffc82b0128f2c064..e751e885617471366a97c16671d58558c1305872 100644 (file)
@@ -304,7 +304,7 @@ static void ts_stats_check_early(struct ts_stats *stats)
                if (stats->total_ts_seen != cp->count)
                        continue;
                /* First occurance of that timestamp count. Check the value. */
-               sr_dbg("TS early chk: total %" PRIu64 ", min delta %zu / %zu.",
+               sr_dbg("TS early chk: total %zu, min delta %" PRIu64 " / %" PRIu64 ".",
                        cp->count, seen_delta, check_delta);
                if (check_delta < cp->delta)
                        return;
@@ -1096,9 +1096,11 @@ static void create_feeds(const struct sr_input *in)
        inc = in->priv;
 
        /* Create one feed for logic data. */
-       inc->unit_size = (inc->logic_count + 7) / 8;
-       inc->feed_logic = feed_queue_logic_alloc(in->sdi,
-               CHUNK_SIZE / inc->unit_size, inc->unit_size);
+       if (inc->logic_count) {
+               inc->unit_size = (inc->logic_count + 7) / 8;
+               inc->feed_logic = feed_queue_logic_alloc(in->sdi,
+                       CHUNK_SIZE / inc->unit_size, inc->unit_size);
+       }
 
        /* Create one feed per analog channel. */
        for (l = inc->channels; l; l = l->next) {