-1 is an int. i+2 is an int. Your system does not have pow(int,int) and the alternatives all look equally "close enough". Compiler cannot decide.
However, why pow()? -1 to any positive integer power should produce either 1 or -1. All you want to know, is the sign. (i+2) is either odd or even. That determines the sign.