]> sigrok.org Git - libsigrok.git/commitdiff
input/logicport: Fix outdated format_match().
authorUwe Hermann <redacted>
Sat, 19 May 2018 19:51:12 +0000 (21:51 +0200)
committerUwe Hermann <redacted>
Sat, 19 May 2018 20:01:18 +0000 (22:01 +0200)
Reported by scan-build:

  src/input/logicport.c:1186:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    .format_match = format_match,
                    ^~~~~~~~~~~~

src/input/logicport.c

index 99ad2c84cce6ea446ff83c0d7cf5aed29f1d9a79..9986e0de0b7225d07f28b402ce56ae37ca99b75c 100644 (file)
@@ -1022,7 +1022,7 @@ static int prepare_session_feed(struct sr_input *in)
        return SR_OK;
 }
 
-static int format_match(GHashTable *metadata)
+static int format_match(GHashTable *metadata, unsigned int *confidence)
 {
        GString *buf, *tmpbuf;
        int rc;
@@ -1041,6 +1041,7 @@ static int format_match(GHashTable *metadata)
        if (rc == SR_OK && version && build) {
                sr_dbg("Looks like a LogicProbe project, version %s, build %s.",
                        version, build);
+               *confidence = 1;
        }
        g_string_free(tmpbuf, TRUE);