diff --git a/include/my_inttypes.h b/include/my_inttypes.h index 97a7f876ecf1be93e7886ee4046fd7515c6be096..8f0acf781cf46baa81938350150228ca28a42eff 100644 --- a/include/my_inttypes.h +++ b/include/my_inttypes.h @@ -1,22 +1,22 @@ /** -* @file my_inttypes.h -* @author Dominik Loidolt (dominik.loidolt@univie.ac.at) -* @date 2021 -* -* @copyright GPLv2 -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* @brief This is a self-created inttypes.h, since the sparc-elf-gcc toolchain -* does not provide one. -* WARNING: Does not fully implement the standard. -*/ + * @file my_inttypes.h + * @author Dominik Loidolt (dominik.loidolt@univie.ac.at) + * @date 2021 + * + * @copyright GPLv2 + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * @brief This is a self-created inttypes.h, since the sparc-elf-gcc toolchain + * does not provide one. + * WARNING: Does not fully implement the standard. + */ #ifndef _MY_INTTYPES_H diff --git a/lib/decmp.c b/lib/decmp.c index 71a28134cb47d36c1195e90c9b840bc87aba01c0..536080282c81edf5c48734436fdb2844adead3a1 100644 --- a/lib/decmp.c +++ b/lib/decmp.c @@ -2028,6 +2028,7 @@ static int decompress_smearing(const struct cmp_cfg *cfg) * compression) * * @returns the size of the decompressed data on success; returns negative on failure + * TODO: change return type to int32_t */ static int decompressed_data_internal(struct cmp_cfg *cfg) diff --git a/test/cmp_icu/test_cmp_decmp.c b/test/cmp_icu/test_cmp_decmp.c index a35eb313c6adb44e2245dd4448fa2a0365ea3531..0d49cbcc1bc17604c84de64573852e08645eb850 100644 --- a/test/cmp_icu/test_cmp_decmp.c +++ b/test/cmp_icu/test_cmp_decmp.c @@ -14,7 +14,7 @@ * more details. * * @brief random compression decompression test - * @detail We generate random data and compress them with random parameters. + * @details We generate random data and compress them with random parameters. * After that we put the data in a compression entity. We decompress the * compression entity and compare the decompressed data with the original * data. @@ -41,7 +41,7 @@ #define IMAX_BITS(m) ((m)/((m)%255+1) / 255%255*8 + 7-86/((m)%255+12)) #define RAND_MAX_WIDTH IMAX_BITS(RAND_MAX) -#define set_n_bits(n) (n!=32?~(~0UL << (n)):0xFFFFFFFF) +#define set_n_bits(n) (n != 32 ? ~(~0UL << (n)):0xFFFFFFFF) /** @@ -493,7 +493,7 @@ void compression_decompression(struct cmp_cfg *cfg) int data_size, cmp_data_size; struct cmp_entity *ent; void *decompressed_data; - static void *model_of_data = NULL; + static void *model_of_data; void *updated_model = NULL; if (!cfg) { @@ -568,7 +568,7 @@ void compression_decompression(struct cmp_cfg *cfg) /** * @brief random compression decompression test - * @detail We generate random data and compress them with random parameters. + * @details We generate random data and compress them with random parameters. * After that we put the data in a compression entity. We decompress the * compression entity and compare the decompressed data with the original * data. @@ -659,9 +659,8 @@ void test_random_compression_decompression2(void) s = decompress_rdcu_data(compressed_data, &info, NULL, NULL, decompressed_data); TEST_ASSERT(s > 0); - for (i = 0; i < N_SAMPLES; i++) { + for (i = 0; i < N_SAMPLES; i++) TEST_ASSERT_EQUAL_HEX16(data[i], decompressed_data[i]); - } free(compressed_data);