From: Julian Seward Date: Fri, 19 Aug 2016 11:47:59 +0000 (+0000) Subject: Add a dummy initialisation and a dummy path to avoid warnings with gcc -Og. X-Git-Tag: svn/VALGRIND_3_12_0^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4370f462d72934630eed36328fe0fd2fbbfd546a;p=thirdparty%2Fvalgrind.git Add a dummy initialisation and a dummy path to avoid warnings with gcc -Og. Neither are actually necessary, but gcc's flow analysis at -Og is weaker than at -O or above and so it produces false warnings here. No functional change. git-svn-id: svn://svn.valgrind.org/vex/trunk@3246 --- diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 8a23f32114..6bd6e8f8bd 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -3469,6 +3469,10 @@ static IRExpr * fp_exp_part( IRType size, IRTemp src ) tsrc = unop( Iop_64HIto32, mkexpr( src ) ); mask = mkU32( 0x7FF ); shift_by = mkU8( 52 - 32 ); + + } else { + /*NOTREACHED*/ + vassert(0); // Stops gcc complaining at "-Og" } return binop( Iop_And32, binop( Iop_Shr32, tsrc, shift_by ), mask ); diff --git a/VEX/priv/host_ppc_defs.c b/VEX/priv/host_ppc_defs.c index 73db64c5d3..dc70f2426b 100644 --- a/VEX/priv/host_ppc_defs.c +++ b/VEX/priv/host_ppc_defs.c @@ -5242,7 +5242,7 @@ Int emit_PPCInstr ( /*MB_MOD*/Bool* is_profInc, case Pin_AvUnary: { UInt v_dst = vregEnc(i->Pin.AvUnary.dst); UInt v_src = vregEnc(i->Pin.AvUnary.src); - UInt opc2, opc3; + UInt opc2 = 0xFFFFFFFF, opc3 = 0xFFFFFFFF; /* invalid */ switch (i->Pin.AvUnary.op) { case Pav_MOV: opc2 = 1156; break; // vor vD,vS,vS