ele7enxxh/Android-Inline-Hook

Compiling warnings

DXCyber409 opened this issue · 1 comments

./relocate.c:239:25: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first
      [-Wshift-op-parentheses]
                        value = ALIGN_PC(pc) + (instruction & 0xFF) << 2;
                                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ~~
./relocate.c:610:18: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
        if (target_addr & 1 == 1) {
                        ^~~~~~~~
keel commented

可修改如下:
value = ALIGN_PC(pc) + ((instruction & 0xFF) << 2);

if ((target_addr & 1) == 1) {