kernel: userspace: fix variable initialization

Need to initialize tidx before using it, to
supress compiler warning.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2020-06-11 09:53:01 +02:00 committed by Maureen Helm
commit 8ada29e06c

View file

@ -282,7 +282,7 @@ struct z_object *z_dynamic_object_create(size_t size)
void *z_impl_k_object_alloc(enum k_objects otype)
{
struct z_object *zo;
uintptr_t tidx;
uintptr_t tidx = 0;
if (otype <= K_OBJ_ANY || otype >= K_OBJ_LAST) {
LOG_ERR("bad object type %d requested", otype);