zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ee6fa31af6
commit
a1b77fd589
2364 changed files with 32505 additions and 32505 deletions
|
@ -17,7 +17,7 @@
|
|||
static void test_u8_to_dec(void)
|
||||
{
|
||||
char text[4];
|
||||
u8_t len;
|
||||
uint8_t len;
|
||||
|
||||
len = u8_to_dec(text, sizeof(text), 0);
|
||||
zassert_equal(len, 1, "Length of 0 is not 1");
|
||||
|
@ -79,16 +79,16 @@ void test_COND_CODE_1(void)
|
|||
/* Test validates that expected code has been injected. Failure would
|
||||
* be seen in compilation (lack of variable or ununsed variable.
|
||||
*/
|
||||
COND_CODE_1(1, (u32_t x0 = 1;), (u32_t y0;))
|
||||
COND_CODE_1(1, (uint32_t x0 = 1;), (uint32_t y0;))
|
||||
zassert_true((x0 == 1), NULL);
|
||||
|
||||
COND_CODE_1(NOT_EXISTING_DEFINE, (u32_t x1 = 1;), (u32_t y1 = 1;))
|
||||
COND_CODE_1(NOT_EXISTING_DEFINE, (uint32_t x1 = 1;), (uint32_t y1 = 1;))
|
||||
zassert_true((y1 == 1), NULL);
|
||||
|
||||
COND_CODE_1(TEST_DEFINE_1, (u32_t x2 = 1;), (u32_t y2 = 1;))
|
||||
COND_CODE_1(TEST_DEFINE_1, (uint32_t x2 = 1;), (uint32_t y2 = 1;))
|
||||
zassert_true((x2 == 1), NULL);
|
||||
|
||||
COND_CODE_1(2, (u32_t x3 = 1;), (u32_t y3 = 1;))
|
||||
COND_CODE_1(2, (uint32_t x3 = 1;), (uint32_t y3 = 1;))
|
||||
zassert_true((y3 == 1), NULL);
|
||||
}
|
||||
|
||||
|
@ -97,16 +97,16 @@ void test_COND_CODE_0(void)
|
|||
/* Test validates that expected code has been injected. Failure would
|
||||
* be seen in compilation (lack of variable or ununsed variable.
|
||||
*/
|
||||
COND_CODE_0(0, (u32_t x0 = 1;), (u32_t y0;))
|
||||
COND_CODE_0(0, (uint32_t x0 = 1;), (uint32_t y0;))
|
||||
zassert_true((x0 == 1), NULL);
|
||||
|
||||
COND_CODE_0(NOT_EXISTING_DEFINE, (u32_t x1 = 1;), (u32_t y1 = 1;))
|
||||
COND_CODE_0(NOT_EXISTING_DEFINE, (uint32_t x1 = 1;), (uint32_t y1 = 1;))
|
||||
zassert_true((y1 == 1), NULL);
|
||||
|
||||
COND_CODE_0(TEST_DEFINE_0, (u32_t x2 = 1;), (u32_t y2 = 1;))
|
||||
COND_CODE_0(TEST_DEFINE_0, (uint32_t x2 = 1;), (uint32_t y2 = 1;))
|
||||
zassert_true((x2 == 1), NULL);
|
||||
|
||||
COND_CODE_0(2, (u32_t x3 = 1;), (u32_t y3 = 1;))
|
||||
COND_CODE_0(2, (uint32_t x3 = 1;), (uint32_t y3 = 1;))
|
||||
zassert_true((y3 == 1), NULL);
|
||||
}
|
||||
|
||||
|
@ -221,8 +221,8 @@ static void test_FOR_EACH(void)
|
|||
{
|
||||
#define FOR_EACH_MACRO_TEST(arg) *buf++ = arg;
|
||||
|
||||
u8_t array[3] = {0};
|
||||
u8_t *buf = array;
|
||||
uint8_t array[3] = {0};
|
||||
uint8_t *buf = array;
|
||||
|
||||
FOR_EACH(FOR_EACH_MACRO_TEST, 1, 2, 3)
|
||||
|
||||
|
@ -231,14 +231,14 @@ static void test_FOR_EACH(void)
|
|||
zassert_equal(array[2], 3, "Unexpected value %d", array[2]);
|
||||
}
|
||||
|
||||
static void fsum(u32_t incr, u32_t *sum)
|
||||
static void fsum(uint32_t incr, uint32_t *sum)
|
||||
{
|
||||
*sum = *sum + incr;
|
||||
}
|
||||
|
||||
static void test_FOR_EACH_FIXED_ARG(void)
|
||||
{
|
||||
u32_t sum = 0;
|
||||
uint32_t sum = 0;
|
||||
|
||||
FOR_EACH_FIXED_ARG(fsum, &sum, 1, 2, 3)
|
||||
|
||||
|
@ -247,7 +247,7 @@ static void test_FOR_EACH_FIXED_ARG(void)
|
|||
|
||||
static void test_FOR_EACH_IDX(void)
|
||||
{
|
||||
#define FOR_EACH_IDX_MACRO_TEST(n, arg) u8_t a##n = arg;
|
||||
#define FOR_EACH_IDX_MACRO_TEST(n, arg) uint8_t a##n = arg;
|
||||
|
||||
FOR_EACH_IDX(FOR_EACH_IDX_MACRO_TEST, 1, 2, 3)
|
||||
|
||||
|
@ -256,7 +256,7 @@ static void test_FOR_EACH_IDX(void)
|
|||
zassert_equal(a2, 3, "Unexpected value %d", a2);
|
||||
|
||||
#define FOR_EACH_IDX_MACRO_TEST2(n, arg) array[n] = arg;
|
||||
u8_t array[32] = {0};
|
||||
uint8_t array[32] = {0};
|
||||
|
||||
FOR_EACH_IDX(FOR_EACH_IDX_MACRO_TEST2, 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
9, 10, 11, 12, 13, 14, 15);
|
||||
|
@ -268,7 +268,7 @@ static void test_FOR_EACH_IDX(void)
|
|||
|
||||
#define FOR_EACH_IDX_MACRO_TEST3(n, arg) &a##n,
|
||||
|
||||
u8_t *a[] = {
|
||||
uint8_t *a[] = {
|
||||
FOR_EACH_IDX(FOR_EACH_IDX_MACRO_TEST3, 1, 2, 3)
|
||||
};
|
||||
|
||||
|
@ -279,7 +279,7 @@ static void test_FOR_EACH_IDX_FIXED_ARG(void)
|
|||
{
|
||||
#undef FOO
|
||||
#define FOO(n, arg, fixed_arg) \
|
||||
u8_t fixed_arg##n = arg;
|
||||
uint8_t fixed_arg##n = arg;
|
||||
|
||||
FOR_EACH_IDX_FIXED_ARG(FOO, a, 1, 2, 3)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue