testing: fix visual studio Compiler Error C2057

expected constant expression
The context requires a constant expression, an expression whose value is known at compile time.
The compiler must know the size of a type at compile time in order to allocate space for an instance of that type.

Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2057?view=msvc-170

Signed-off-by: chao an anchao@xiaomi.com
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-08-28 11:23:11 +08:00 committed by Xiang Xiao
parent afcc8d8f62
commit 6923c9cf57
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@
#else
/* Message length is the size of the message plus the null terminator */
# define TEST_MSGLEN (strlen(TEST_MESSAGE)+1)
# define TEST_MSGLEN sizeof(TEST_MESSAGE)
#endif
#define TEST_SEND_NMSGS (10)

View File

@ -49,7 +49,7 @@
#else
/* Message length is the size of the message plus the null terminator */
# define TEST_MSGLEN (strlen(TEST_MESSAGE)+1)
# define TEST_MSGLEN sizeof(TEST_MESSAGE)
#endif
#define TEST_SEND_NMSGS (10)