diff options
Diffstat (limited to 'recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch')
| -rw-r--r-- | recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch b/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch new file mode 100644 index 000000000..58734aa49 --- /dev/null +++ b/recipes-security/optee-imx/optee-test/0005-benchmark_1000-fix-compilation-against-musl-uint.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | From f74e9f339a8e8cb97fc8ea03bef51d7e3862a60a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> | ||
| 3 | Date: Thu, 7 Feb 2019 01:31:27 +0000 | ||
| 4 | Subject: [PATCH 3/3] benchmark_1000: fix compilation against musl (uint) | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Compiling against musl-libc fails with the following error: | ||
| 10 | |||
| 11 | | .../host/xtest/benchmark_1000.c: In function 'show_test_result': | ||
| 12 | | .../host/xtest/benchmark_1000.c:102:2: error: unknown type name 'uint'; did you mean 'int'? | ||
| 13 | | uint i; | ||
| 14 | | ^~~~ | ||
| 15 | | int | ||
| 16 | | ...host/xtest/benchmark_1000.c:108:16: error: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'unsigned int'} [-Werror=sign-compare] | ||
| 17 | | for (i = 0; i < size; i++) { | ||
| 18 | | ^ | ||
| 19 | |||
| 20 | etc. | ||
| 21 | |||
| 22 | Convert to using more standard size_t | ||
| 23 | |||
| 24 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
| 25 | Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | ||
| 26 | Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
| 27 | --- | ||
| 28 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
| 29 | Upstream-Status: Backport [3.5.0] | ||
| 30 | host/xtest/benchmark_1000.c | 4 ++-- | ||
| 31 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 32 | |||
| 33 | diff --git a/host/xtest/benchmark_1000.c b/host/xtest/benchmark_1000.c | ||
| 34 | index bf92fa0..1caf420 100644 | ||
| 35 | --- a/host/xtest/benchmark_1000.c | ||
| 36 | +++ b/host/xtest/benchmark_1000.c | ||
| 37 | @@ -99,7 +99,7 @@ static TEEC_Result run_chunk_access_test(enum storage_benchmark_cmd cmd, | ||
| 38 | |||
| 39 | static void show_test_result(struct test_record records[], size_t size) | ||
| 40 | { | ||
| 41 | - uint i; | ||
| 42 | + size_t i; | ||
| 43 | |||
| 44 | printf("-----------------+---------------+----------------\n"); | ||
| 45 | printf(" Data Size (B) \t | Time (s)\t | Speed (kB/s)\t \n"); | ||
| 46 | @@ -119,7 +119,7 @@ static void chunk_test(ADBG_Case_t *c, enum storage_benchmark_cmd cmd) | ||
| 47 | { | ||
| 48 | uint32_t chunk_size = DEFAULT_CHUNK_SIZE; | ||
| 49 | struct test_record records[ARRAY_SIZE(data_size_table) - 1]; | ||
| 50 | - uint i; | ||
| 51 | + size_t i; | ||
| 52 | |||
| 53 | for (i = 0; data_size_table[i]; i++) { | ||
| 54 | ADBG_EXPECT_TEEC_SUCCESS(c, | ||
| 55 | -- | ||
| 56 | 2.23.0.rc1 | ||
| 57 | |||
