]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add a dummy initialisation and a dummy path to avoid warnings with gcc -Og.
authorJulian Seward <jseward@acm.org>
Fri, 19 Aug 2016 11:47:59 +0000 (11:47 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 19 Aug 2016 11:47:59 +0000 (11:47 +0000)
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

VEX/priv/guest_ppc_toIR.c
VEX/priv/host_ppc_defs.c

index 8a23f3211424d3618115305a11f4e74a315abb52..6bd6e8f8bddba853eb3c1f5c589792f07ff3998b 100644 (file)
@@ -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 );
index 73db64c5d33d62cd82cd3aa1d07c7ee05becf3f5..dc70f2426b98693cf0f14b365ebda84c8ef451fa 100644 (file)
@@ -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