From bc05ecebf66531ebed82ad630d096061087ea18d Mon Sep 17 00:00:00 2001 From: Yinan Zhang Date: Wed, 5 Feb 2020 15:33:31 -0800 Subject: [PATCH] Add const qualifier in assert_cmp() --- test/include/test/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/include/test/test.h b/test/include/test/test.h index 07f58a47..9081716b 100644 --- a/test/include/test/test.h +++ b/test/include/test/test.h @@ -1,8 +1,8 @@ #define ASSERT_BUFSIZE 256 #define assert_cmp(t, a, b, cmp, neg_cmp, pri, ...) do { \ - t a_ = (a); \ - t b_ = (b); \ + const t a_ = (a); \ + const t b_ = (b); \ if (!(a_ cmp b_)) { \ char prefix[ASSERT_BUFSIZE]; \ char message[ASSERT_BUFSIZE]; \