]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd: Use PRIu64 for uint64_t values.
authorUwe Hermann <redacted>
Fri, 27 Jan 2012 17:38:16 +0000 (18:38 +0100)
committerUwe Hermann <redacted>
Fri, 27 Jan 2012 17:38:16 +0000 (18:38 +0100)
Using %d seems to silently work on Linux, but leads to a segfault on
Windows/MinGW.

type_decoder.c

index 6ed2787be8ad6444332b74e2741349b2f9f682b6..bbf1f64c2a8dfd6ec369f44dea84aba44148aac9 100644 (file)
@@ -114,9 +114,9 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
        }
        pdo = l->data;
 
-       srd_spew("Instance %s put %d-%d %s on oid %d.", di->instance_id,
-                start_sample, end_sample, OUTPUT_TYPES[pdo->output_type],
-                output_id);
+       srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.",
+                di->instance_id, start_sample, end_sample,
+                OUTPUT_TYPES[pdo->output_type], output_id);
 
        if (!(pdata = g_try_malloc0(sizeof(struct srd_proto_data))))
                return NULL;