From: Carl Love Date: Wed, 25 Nov 2015 17:48:25 +0000 (+0000) Subject: This is a fix to Bug 354797 which added the vbit test support for the X-Git-Tag: svn/VALGRIND_3_12_0~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0201caa575ecb70350036d1c4fd1a64817627296;p=thirdparty%2Fvalgrind.git This is a fix to Bug 354797 which added the vbit test support for the Power 8 instructions. The patch for bug 354797 moved the declaration for rc outside of the architecture #ifdef. This results in an message about rc being unused on architectures other then s390 and powerpc. This commit eliminates the issue by: powerpc: move rc declaration into #ifdef for powerpc. Remove tab, put in missing break. s390: remove rc declaration from inside case statement. Put rc declaration before the switch statement but within the #ifdef for s390 so it will be declared for use in both case clauses. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15738 --- diff --git a/memcheck/tests/vbit-test/irops.c b/memcheck/tests/vbit-test/irops.c index b45c326a6a..83fcd02f8e 100644 --- a/memcheck/tests/vbit-test/irops.c +++ b/memcheck/tests/vbit-test/irops.c @@ -1092,7 +1092,6 @@ STATIC_ASSERT \ irop_t * get_irop(IROp op) { - int rc; unsigned i; for (i = 0; i < sizeof irops / sizeof *irops; ++i) { @@ -1100,6 +1099,8 @@ get_irop(IROp op) if (p->op == op) { #ifdef __s390x__ #define S390X_FEATURES "../../../tests/s390x_features" + int rc; + switch (op) { case Iop_I32StoD64: // CDFTR case Iop_I32StoD128: // CXFTR @@ -1151,7 +1152,6 @@ get_irop(IROp op) case Iop_D128toF32: case Iop_D128toF64: case Iop_D128toF128: { - int rc; /* These IROps require the Perform Floating Point Operation facility */ rc = system(S390X_FEATURES " s390x-pfpo"); @@ -1171,6 +1171,7 @@ get_irop(IROp op) #endif #ifdef __powerpc__ #define MIN_POWER_ISA "../../../tests/min_power_isa" + int rc; switch (op) { case Iop_DivS64E: @@ -1193,7 +1194,9 @@ get_irop(IROp op) if (rc > 2) { panic(" ERROR, min_power_isa() return code is invalid.\n"); } - } + } + break; + case Iop_PwBitMtxXpose64x2: case Iop_Clz64x2: case Iop_BCDAdd: