Fix compiler warnings in learning and core