I tried to build opencv 2.4.10 on Mac 10.10.3 with Xcode 6.3. And the following errors occurred by building.
/Users/Shirui/work/program/opencv-2.4.10/modules/legacy/src/
I'm told that you can disable the warning globally by adding -Wno-tautological-pointer-compare to your compiler flags, or on a one-off basis by wrapping the variable you're testing in parentheses.