From: Julian Seward Date: Tue, 19 Jul 2016 05:32:50 +0000 (+0000) Subject: dis_pc_relative, case 0x002: remove a path that cannot be taken. That X-Git-Tag: svn/VALGRIND_3_12_0^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a2e705043d8135ff9c64ca2782c7becec59f7c0;p=thirdparty%2Fvalgrind.git dis_pc_relative, case 0x002: remove a path that cannot be taken. That stops gcc -Og complaining. It complains because at that relatively low level of optimisation, its flow analysis is apparently too weak to see that the removed path cannot be taken and so it complains (wrongly) about a possibly uninitialised use of |result|. No functional change. git-svn-id: svn://svn.valgrind.org/vex/trunk@3226 --- diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c index 2c8617a200..2fa952be92 100644 --- a/VEX/priv/guest_ppc_toIR.c +++ b/VEX/priv/guest_ppc_toIR.c @@ -7603,13 +7603,11 @@ static Bool dis_pc_relative ( UInt theInstr ) if ( ty == Ity_I32 ) { result = binop( Iop_Add32, nia, mkU32( D << 16 ) ); - - } else if ( ty == Ity_I64 ) { - result = binop( Iop_Add64, nia, mkU64( D << 16 ) ); - } else { - vex_printf("dis_pc_relative(unsupported type)\n"); + vassert( ty == Ity_I64 ); + result = binop( Iop_Add64, nia, mkU64( D << 16 ) ); } + putIReg( rT_addr, result); } break;