]> sigrok.org Git - libsigrok.git/commitdiff
sysclk-sla5032: Fix compiler warnings (max vs. MAX).
authorUwe Hermann <redacted>
Mon, 22 Apr 2019 11:12:20 +0000 (13:12 +0200)
committerUwe Hermann <redacted>
Mon, 22 Apr 2019 11:39:48 +0000 (13:39 +0200)
  src/hardware/sysclk-sla5032/protocol.c: In function ‘la_start_acquisition’:
  src/hardware/sysclk-sla5032/protocol.c:244:8: warning: implicit declaration of function ‘max’ [-Wimplicit-function-declaration]
    pre = max(pre, 2);
          ^~~

src/hardware/sysclk-sla5032/protocol.c

index 24683f9e948c18dd6319a2aa3a5c55130804e086..c4011da1df517a16b2b0d9af0198cafbedd856b1 100644 (file)
@@ -241,11 +241,11 @@ SR_PRIV int la_start_acquisition(const struct sr_dev_inst *sdi)
 
        sr_dbg("start acquision, pre: %" PRIu64 ", post: %" PRIu64 ".", pre, post);
        pre /= 256;
-       pre = max(pre, 2);
+       pre = MAX(pre, 2);
        pre--;
 
        post /= 256;
-       post = max(post, 2);
+       post = MAX(post, 2);
        post--;
 
        sr_dbg("start acquision, pre: %" PRIx64 ", post: %" PRIx64 ".", pre, post);