merge and warnings cleanup

I merged upstream/hifi into samcake/19734 and resolved the one conflict.

I also fixed some warnings about signed/unsigned comparison and did some cleanup to fix another warning about an usesed variable.