Commit: Fix compile time warnings for riscv

Nick Clifton nickc@redhat.com
Fri Feb 19 10:13:52 GMT 2021


Hi Nelson,

  I am checking in the patch below as an obvious fix for these compile
  time warnings:

gas/config/tc-riscv.c:2090:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
gas/config/tc-riscv.c:2096:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'

gas/config/tc-riscv.c:2099:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
gas/config/tc-riscv.c:2105:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'

gas/config/tc-riscv.c:2108:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
gas/config/tc-riscv.c:2114:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'

Cheers
  Nick

gas/ChangeLog
2021-02-19  Nick Clifton  <nickc@redhat.com>

	* config/tc-riscv.c (riscv_ip): Fix compile time warnings about
	misleading indentation.

diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 5f4f3ec273..bbf705208a 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -2093,7 +2093,7 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
 		      || imm_expr->X_add_number >= 32
 		      || !VALID_CLTYPE_IMM ((valueT) imm_expr->X_add_number))
 		    break;
-		    ip->insn_opcode |= ENCODE_CLTYPE_IMM (imm_expr->X_add_number);
+		  ip->insn_opcode |= ENCODE_CLTYPE_IMM (imm_expr->X_add_number);
 		  goto rvc_imm_done;
 		case '6':
 		  if (my_getSmallExpression (imm_expr, imm_reloc, s, p)
@@ -2102,7 +2102,7 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
 		      || imm_expr->X_add_number >= 64
 		      || !VALID_CSSTYPE_IMM ((valueT) imm_expr->X_add_number))
 		    break;
-		    ip->insn_opcode |= ENCODE_CSSTYPE_IMM (imm_expr->X_add_number);
+		  ip->insn_opcode |= ENCODE_CSSTYPE_IMM (imm_expr->X_add_number);
 		  goto rvc_imm_done;
 		case '8':
 		  if (my_getSmallExpression (imm_expr, imm_reloc, s, p)
@@ -2111,7 +2111,7 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
 		      || imm_expr->X_add_number >= 256
 		      || !VALID_CIWTYPE_IMM ((valueT) imm_expr->X_add_number))
 		    break;
-		    ip->insn_opcode |= ENCODE_CIWTYPE_IMM (imm_expr->X_add_number);
+		  ip->insn_opcode |= ENCODE_CIWTYPE_IMM (imm_expr->X_add_number);
 		  goto rvc_imm_done;
 		case 'j':
 		  if (my_getSmallExpression (imm_expr, imm_reloc, s, p)



More information about the Binutils mailing list