From ebdba150bff1d914805d60efa576337bbef0c305 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Fri, 22 Jan 2016 14:27:28 +0000 Subject: [PATCH] xenalyze: fix misleading indentation. gcc-6 adds -Wmisleading-indentation which found these issues. xenalyze.c: In function 'weighted_percentile': xenalyze.c:2136:18: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] L=I; L_weight = I_weight; ^~~~~~~~ xenalyze.c:2135:9: note: ...this 'if' clause, but it is not if(J_weight Reviewed-by: George Dunlap --- tools/xentrace/xenalyze.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 5a2735c..4bcaf83 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -2132,10 +2132,14 @@ float weighted_percentile(float * A, /* values */ } while (I <= J); /* Keep going until our pointers meet or pass */ /* Re-adjust L and R, based on which element we're looking for */ - if(J_weight Date: Thu, 10 Nov 2016 10:23:31 +0100 Subject: [PATCH] Fix misleading indentation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Gcc6 build reports misleading indentation as warnings. Fix a few warnings in stubdom. Signed-off-by: Cédric Bosdonnat Acked-by: Daniel De Graaf Acked-by: Quan Xu Release-acked-by: Wei Liu --- stubdom/vtpmmgr/disk_read.c | 8 ++++---- stubdom/vtpmmgr/log.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stubdom/vtpmmgr/disk_read.c b/stubdom/vtpmmgr/disk_read.c index 944d3ff..48cfbfe 100644 --- a/stubdom/vtpmmgr/disk_read.c +++ b/stubdom/vtpmmgr/disk_read.c @@ -123,10 +123,10 @@ static int parse_root_key(struct mem_tpm_mgr *dst, struct disk_seal_entry *src) struct disk_root_sealed_data sealed; /*TPM 2.0 unbind | TPM 1.x unseal*/ - if (hw_is_tpm2()) - rc = TPM2_disk_unbind(&sealed, &olen, src); - else - rc = TPM_disk_unseal(&sealed, sizeof(sealed), src); + if (hw_is_tpm2()) + rc = TPM2_disk_unbind(&sealed, &olen, src); + else + rc = TPM_disk_unseal(&sealed, sizeof(sealed), src); if (rc) return rc; diff --git a/stubdom/vtpmmgr/log.c b/stubdom/vtpmmgr/log.c index a82c913..c1bc8f3 100644 --- a/stubdom/vtpmmgr/log.c +++ b/stubdom/vtpmmgr/log.c @@ -147,5 +147,5 @@ const char* tpm_get_error_name (TPM_RESULT code) { if (code == error_msgs[i].code) return error_msgs[i].code_name; - return("Unknown Error Code"); + return("Unknown Error Code"); } -- 2.1.4