Skip to content

Commit 3c277b7

Browse files
author
Virgil Serbanuta
committed
Fix include and most unused variable warnings.
1 parent 7750fd7 commit 3c277b7

38 files changed

+109
-109
lines changed

.build/k

Submodule k updated from 6659639 to 04ad88e

semantics/c-cpp-linking.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require "kast.k"
2-
require "domains.k"
1+
require "kast.md"
2+
require "domains.md"
33

44
require "cpp/linking.k"
55

semantics/c-cpp.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require "kast.k"
2-
require "domains.k"
1+
require "kast.md"
2+
require "domains.md"
33

44
require "c/language/common/common.k"
55
require "c/language/execution/configuration.k"

semantics/c-translation.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
require "kast.k"
2-
require "domains.k"
1+
require "kast.md"
2+
require "domains.md"
33

44
require "c/language/common/common.k"
55
require "c/language/translation/configuration.k"

semantics/c/language/common/binding.k

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ module C-BINDING
7878
~> bind(.List, _, ListItem(_) _)
7979
rule (.K => UNDEF("CB4", "Function defined with no parameters "
8080
+String "called with arguments."))
81-
~> bind(ListItem(typedDeclaration(t(... st: void) #as T::Type, _)), _, ListItem(_) _)
81+
~> bind(ListItem(typedDeclaration(t(... st: void) #as _T::Type, _)), _, ListItem(_) _)
8282
// Variadic.
8383
rule bind(ListItem(variadic), ListItem(variadic), Vs:List)
8484
=> bindVariadics(Vs, 0)
8585
[structural]
8686
// No params.
8787
rule bind(ListItem(t(... st: void)), .List, .List) => .K
8888
[structural]
89-
rule bind(ListItem(typedDeclaration(t(... st: void) #as T::Type, _)),
89+
rule bind(ListItem(typedDeclaration(t(... st: void) #as _T::Type, _)),
9090
.List, .List) => .K
9191
[structural]
9292
// Builtins -- they don't have named parameters.
@@ -112,8 +112,8 @@ module C-BINDING
112112
<next-unnamed> N:Int => N +Int 1 </next-unnamed>
113113
requires T =/=K variadic
114114
[structural]
115-
rule bind(ListItem(t(... st: void) #as T::Type),
116-
ListItem(t(... st: void) #as T'::Type), .List) => .K
115+
rule bind(ListItem(t(... st: void) #as _T::Type),
116+
ListItem(t(... st: void) #as _T'::Type), .List) => .K
117117
[structural]
118118
rule bind(.List, .List, .List) => .K
119119
[structural]

semantics/c/language/common/check-use.k

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ module C-CHECK-USE
4343
[structural]
4444

4545
syntax Error ::= "errorLinkUnresolved"
46-
rule <k> checkLoc(loc(Base:LinkBase, _))
46+
rule <k> checkLoc(loc(_Base:LinkBase, _))
4747
=> EXT-UNDEF("TDR2", "No definition for symbol with external linkage.")
4848
~> errorLinkUnresolved
4949
...</k>
5050
requires currentSemantics() ==K ExecutionSemantics()
5151
[structural]
52-
rule <k> checkLoc(loc(Base:LinkBase, _, _))
52+
rule <k> checkLoc(loc(_Base:LinkBase, _, _))
5353
=> EXT-UNDEF("TDR2", "No definition for symbol with external linkage.")
5454
~> errorLinkUnresolved
5555
...</k>

semantics/c/language/common/conversion.k

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module C-CONVERSION
7878
=> tv(V, castTypes(T', T))
7979
requires T' =/=Type T andBool notBool isBoolUType(T') andBool intInRange(V, T')
8080

81-
rule cast(integerUType #as T'::UType, tv(encodedPtr(L:SymLoc, N::Int, M::Int), integerUType #as T::UType))
81+
rule cast(integerUType #as T'::UType, tv(encodedPtr(L:SymLoc, N::Int, M::Int), integerUType #as _T::UType))
8282
=> tv(encodedPtr(L, N, M), T')
8383
requires notBool isBoolUType(T')
8484
andBool M -Int N <=Int bitSizeofType(T')
@@ -272,7 +272,7 @@ module C-CONVERSION
272272
a trap representation.
273273
}*/
274274
rule (.K => IMPL("CCV13", "Conversion from an integer to non-null pointer."))
275-
~> cast(ut(... st: pointerType(_)) #as T'::UType, tv(V:CValue, integerUType #as T::UType))
275+
~> cast(ut(... st: pointerType(_)) #as _T'::UType, tv(V:CValue, integerUType #as T::UType))
276276
requires notBool isNullPointerConstant(tv(V, T))
277277

278278
/*@ \fromStandard{\source[n1570]{\para{6.3.2.3}{6}}}{
@@ -348,11 +348,11 @@ module C-CONVERSION
348348
[structural]
349349
rule (.K => UNDEF("CCV14",
350350
"Conversion of a function pointer to object pointer type."))
351-
~> cast(ut(_, pointerType(T'::Type)), tv(Loc:SymLoc, ut(_, pointerType(T::Type))))
351+
~> cast(ut(_, pointerType(T'::Type)), tv(_Loc:SymLoc, ut(_, pointerType(T::Type))))
352352
requires isFunctionType(T) andBool notBool isFunctionType(T')
353353
[structural]
354354
rule (.K => lintCastingAwayQuals())
355-
~> cast(ut(_, pointerType(T'::Type)), tv(Loc:SymLoc, ut(_, pointerType(T::Type => addQualifiers(getQualifiers(T'), stripQualifiers(T))))))
355+
~> cast(ut(_, pointerType(T'::Type)), tv(_Loc:SymLoc, ut(_, pointerType(T::Type => addQualifiers(getQualifiers(T'), stripQualifiers(T))))))
356356
requires getQualifiers(T) >Quals getQualifiers(T')
357357
[structural]
358358

semantics/c/language/common/expr/additive.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ module C-COMMON-EXPR-ADDITIVE
169169
requires ifFromArrayInBounds(Loc, utype(pointerType(type(char))), I) ==K true
170170
rule (.K => UNDEF("CEA1",
171171
"A pointer (or array subscript) outside the bounds of an object."))
172-
~> addToIntptr(Loc:SymLoc, T::UType, I:Int)
172+
~> addToIntptr(Loc:SymLoc, _T::UType, I:Int)
173173
requires notBool ifFromArrayInBounds(Loc, utype(pointerType(type(char))), I)
174174

175175
syntax SymLoc ::= newFromArray(SymLoc, UType, Int) [function]

semantics/c/language/common/expr/eval.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module C-COMMON-EXPR-EVAL
5959
requires notBool isArrayOrFunctionType(T)
6060
[structural]
6161

62-
rule <k> lv(Loc::SymLoc => resolveLinking(Loc, Linkings), T::Type) ...</k>
62+
rule <k> lv(Loc::SymLoc => resolveLinking(Loc, Linkings), _T::Type) ...</k>
6363
<linkings> Linkings::Map </linkings>
6464
requires Loc =/=K NullPointer andBool (base(Loc) in_keys(Linkings))
6565
[structural]

semantics/c/language/common/expr/members.k

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module C-COMMON-EXPR-MEMBERS
6161
requires notBool isNoType(findFieldTypeU(F, T))
6262
[structural]
6363
rule (.K => unknownMemberAccess)
64-
~> tv(agg(L:List), structOrUnionUType #as T::UType) . F:CId
64+
~> tv(agg(_L:List), structOrUnionUType #as T::UType) . F:CId
6565
requires isNoType(findFieldTypeU(F, T))
6666

6767
syntax Type ::= findFieldTypeU(CId, UType) [function]

0 commit comments

Comments
 (0)