]> sigrok.org Git - libsigrok.git/commitdiff
hantek-4032l: Fix a compiler warning.
authorUwe Hermann <redacted>
Fri, 9 Feb 2018 20:26:38 +0000 (21:26 +0100)
committerUwe Hermann <redacted>
Fri, 9 Feb 2018 20:44:23 +0000 (21:44 +0100)
  api.c: In function 'config_set':
  api.c:352:5: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint64_t' [-Wformat=]
       sr_err("invalid sample range 2k...64M: %ld",
       ^

src/hardware/hantek-4032l/api.c

index 9576fabccb068ad9fcc6ac3d5b6951e2769fabe7..71c899e5fa04251e9af76a23e3139a0b0e5ab23b 100644 (file)
@@ -349,8 +349,8 @@ static int config_set(uint32_t key, GVariant *data,
                        number_samples &= 0xfffffe00;
                        if (number_samples < 2048
                            || number_samples > 64 * 1024 * 1024) {
-                               sr_err("invalid sample range 2k...64M: %ld",
-                                      number_samples);
+                               sr_err("invalid sample range 2k...64M: %"
+                                      PRIu64, number_samples);
                                return SR_ERR;
                        }
                        cmd_pkt->sample_size = number_samples;