Skip to content

Commit 4dc49a1

Browse files
committed
Address incorrect format code elements in alert message
1 parent f1c4dac commit 4dc49a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

c/misra/src/rules/RULE-6-1/BitFieldsShallOnlyBeDeclaredWithAnAppropriateType.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ where
4141
/* A violation would neither be an appropriate primitive type nor an appropriate typedef. */
4242
not getSupportedBitFieldType(getCompiler(bitField.getFile())) =
4343
bitField.getType().resolveTypedefs()
44-
select bitField, "Bit-field " + bitField + " is declared on type " + bitField.getType() + "."
44+
select bitField, "Bit-field '" + bitField + "' is declared on type '" + bitField.getType() + "'."
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| test.c:6:7:6:8 | x1 | Bit-field x1 is declared on type int. |
2-
| test.c:10:15:10:16 | x5 | Bit-field x5 is declared on type signed long. |
3-
| test.c:12:15:12:16 | x6 | Bit-field x6 is declared on type signed char. |
4-
| test.c:14:14:14:15 | x7 | Bit-field x7 is declared on type Color. |
1+
| test.c:6:7:6:8 | x1 | Bit-field 'x1' is declared on type 'int'. |
2+
| test.c:10:15:10:16 | x5 | Bit-field 'x5' is declared on type 'signed long'. |
3+
| test.c:12:15:12:16 | x6 | Bit-field 'x6' is declared on type 'signed char'. |
4+
| test.c:14:14:14:15 | x7 | Bit-field 'x7' is declared on type 'Color'. |

0 commit comments

Comments
 (0)