From 7e7ae6dbb5579c2e163d87ff7bcc774de459b96b Mon Sep 17 00:00:00 2001 From: iod1hc Date: Thu, 12 Nov 2020 15:59:53 +0700 Subject: tests: fix conversion warnings - Casting data type to the right format. Signed-off-by: Dinh Cong Toan --- src/tests/dlt-test-stress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tests/dlt-test-stress.c') diff --git a/src/tests/dlt-test-stress.c b/src/tests/dlt-test-stress.c index 4044edf..9698b7b 100644 --- a/src/tests/dlt-test-stress.c +++ b/src/tests/dlt-test-stress.c @@ -288,7 +288,7 @@ void stress2(void) printf("Starting stress test2... \n"); - srand(time(NULL)); + srand((unsigned int) time(NULL)); printf("* Creating %d Threads, each of them registers one context,\n", STRESS2_MAX_NUM_THREADS); printf(" sending one log message, then unregisters the context\n"); @@ -350,8 +350,8 @@ void stress3(void) printf("* Logging raw data, up to a size of %d\n", STRESS3_MAX_NUM_MESSAGES); for (num = 0; num < STRESS3_MAX_NUM_MESSAGES; num++) { - buffer[num] = num; - DLT_LOG(context_stress3, DLT_LOG_INFO, DLT_INT(num), DLT_RAW(buffer, num)); + buffer[num] = (char) num; + DLT_LOG(context_stress3, DLT_LOG_INFO, DLT_INT(num), DLT_RAW(buffer,(uint16_t) num)); ts.tv_sec = 0; ts.tv_nsec = 10000 * 1000; nanosleep(&ts, NULL); -- cgit v1.2.1