tests: lib: cbprintf_package: Minor cleanup
Adding static to local functions. Using void * for %p argument which often triggered compilation warning. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
9280b90939
commit
604c9ac231
1 changed files with 4 additions and 3 deletions
|
@ -37,7 +37,7 @@ static char static_buf[512];
|
|||
static char runtime_buf[512];
|
||||
static char compare_buf[128];
|
||||
|
||||
void dump(const char *desc, uint8_t *package, size_t len)
|
||||
static void dump(const char *desc, uint8_t *package, size_t len)
|
||||
{
|
||||
printk("%s package %p:\n", desc, package);
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
|
@ -46,7 +46,7 @@ void dump(const char *desc, uint8_t *package, size_t len)
|
|||
printk("\n");
|
||||
}
|
||||
|
||||
void unpack(const char *desc, struct out_buffer *buf,
|
||||
static void unpack(const char *desc, struct out_buffer *buf,
|
||||
uint8_t *package, size_t len)
|
||||
{
|
||||
cbpprintf((cbprintf_cb)out, buf, package);
|
||||
|
@ -105,6 +105,7 @@ void test_cbprintf_package(void)
|
|||
unsigned short us = 0x1234;
|
||||
unsigned long ul = 0xaabbaabb;
|
||||
unsigned long long ull = 0xaabbaabbaabb;
|
||||
void *vp = NULL;
|
||||
|
||||
|
||||
/* tests to exercize different element alignments */
|
||||
|
@ -115,7 +116,7 @@ void test_cbprintf_package(void)
|
|||
TEST_PACKAGING("test %d %hd %hhd", i, s, sc);
|
||||
TEST_PACKAGING("test %ld %llx %hhu %hu %u", li, lli, uc, us, ui);
|
||||
TEST_PACKAGING("test %lu %llu", ul, ull);
|
||||
TEST_PACKAGING("test %c %p", c, &c);
|
||||
TEST_PACKAGING("test %c %p", c, vp);
|
||||
|
||||
if (IS_ENABLED(CONFIG_CBPRINTF_FP_SUPPORT)) {
|
||||
float f = -1.234;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue