Skip to content

Commit a5eb426

Browse files
Fix format issues
1 parent bd3e06b commit a5eb426

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

c/misra/src/codingstandards/c/misra/EssentialTypes.qll

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ class EssentialBinaryArithmeticExpr extends EssentialExpr, BinaryArithmeticOpera
297297
exists(
298298
Type leftEssentialType, Type rightEssentialType,
299299
EssentialTypeCategory leftEssentialTypeCategory,
300-
EssentialTypeCategory rightEssentialTypeCategory,
301-
int intTypeSize
300+
EssentialTypeCategory rightEssentialTypeCategory, int intTypeSize
302301
|
303302
leftEssentialType = getEssentialType(getLeftOperand()) and
304303
rightEssentialType = getEssentialType(getRightOperand()) and
@@ -340,19 +339,19 @@ class EssentialBinaryArithmeticExpr extends EssentialExpr, BinaryArithmeticOpera
340339
) and
341340
(
342341
leftEssentialTypeCategory =
343-
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)]
344-
and leftEssentialType.getSize() <= intTypeSize
342+
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)] and
343+
leftEssentialType.getSize() <= intTypeSize
345344
or
346345
rightEssentialTypeCategory =
347-
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)]
348-
and rightEssentialType.getSize() <= intTypeSize
346+
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)] and
347+
rightEssentialType.getSize() <= intTypeSize
349348
)
350349
or
351350
this instanceof SubExpr and
352351
leftEssentialTypeCategory = EssentiallyCharacterType() and
353352
rightEssentialTypeCategory =
354-
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)]
355-
and rightEssentialType.getSize() <= intTypeSize
353+
[EssentiallySignedType(), EssentiallyUnsignedType().(TEssentialTypeCategory)] and
354+
rightEssentialType.getSize() <= intTypeSize
356355
then result instanceof PlainCharType
357356
else result = this.getStandardType()
358357
)

c/misra/test/rules/RULE-7-4/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void w_call6() {
8585
w_sample6(1, "string10"); // COMPLIANT by first (and only) exception
8686
}
8787

88-
void w_sample7(char* x, ...) {}
88+
void w_sample7(char *x, ...) {}
8989

9090
void w_call7() {
9191
w_sample7("string11", 1); // NON_COMPLIANT, does not fit exceptional case

cpp/common/test/rules/invalidatedenvstringpointers/test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,18 @@ void f11(void) {
211211
void f12(void) {
212212
time_t rawtime;
213213
time(&rawtime);
214-
char* r1 = ctime(&rawtime);
214+
char *r1 = ctime(&rawtime);
215215
asctime(localtime(&rawtime));
216216
printf("%s", r1); // NON_COMPLIANT
217217
}
218218

219219
void f13(void) {
220220
time_t rawtime;
221221
time(&rawtime);
222-
char* r1 = ctime(&rawtime);
222+
char *r1 = ctime(&rawtime);
223223
printf("%s", r1); // COMPLIANT
224224

225-
char* r2 = asctime(localtime(&rawtime));
225+
char *r2 = asctime(localtime(&rawtime));
226226
printf("%s", r1); // NON_COMPLIANT
227227
printf("%s", r2); // COMPLIANT
228228

0 commit comments

Comments
 (0)