testcase/kernel: fix a compilation error on semaphore
CC:  le_tc/kernel/tc_libc_semaphore.c
le_tc/kernel/tc_libc_semaphore.c: In function 'tc_libc_semaphore_sem_init':
le_tc/kernel/tc_libc_semaphore.c:54:10: error: unused variable 'sem_flag' [-Werror=unused-variable]
uint8_t sem_flag;
^~~~~~~~
==> Add a conditional at definition with CONFIG_PRIORITY_INHERITANCE
@@ -51,7 +51,9 @@ static void tc_libc_semaphore_sem_init(void)
sem_t sem;
unsigned int value = SEM_VALUE;
int ret_chk;
+#ifdef CONFIG_PRIORITY_INHERITANCE
uint8_t sem_flag;
+#endif
ret_chk = sem_init(NULL, PSHARED, 0);
TC_ASSERT_EQ("sem_init", ret_chk, ERROR);
