Fix a couple of warnings in appdomain.c and threads.c.