diff options
author | iod1hc <toan.dinhcong@vn.bosch.com> | 2020-11-12 15:59:53 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-01-06 09:27:28 +0900 |
commit | 7e7ae6dbb5579c2e163d87ff7bcc774de459b96b (patch) | |
tree | b2e5e358ca68957073414b05287d9da679c38ea0 /src/tests/dlt-test-stress.c | |
parent | 699d52298bfde3ab5721a78264d5a4f4e2f326ef (diff) | |
download | DLT-daemon-7e7ae6dbb5579c2e163d87ff7bcc774de459b96b.tar.gz |
tests: fix conversion warnings
- Casting data type to the right format.
Signed-off-by: Dinh Cong Toan <Toan.DinhCong@vn.bosch.com>
Diffstat (limited to 'src/tests/dlt-test-stress.c')
-rw-r--r-- | src/tests/dlt-test-stress.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |