From: Uwe Hermann Date: Mon, 22 Apr 2019 11:12:20 +0000 (+0200) Subject: sysclk-sla5032: Fix compiler warnings (max vs. MAX). X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=262cb9968d41710a927cb10c99bb65d9901d6094;p=libsigrok.git sysclk-sla5032: Fix compiler warnings (max vs. MAX). 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); ^~~ --- diff --git a/src/hardware/sysclk-sla5032/protocol.c b/src/hardware/sysclk-sla5032/protocol.c index 24683f9e..c4011da1 100644 --- a/src/hardware/sysclk-sla5032/protocol.c +++ b/src/hardware/sysclk-sla5032/protocol.c @@ -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);