Skip to content

Commit c5f2cd0

Browse files
[SYCL][NFC] Fix comparison warnings in Base64, PropertySetIO (#2329)
Signed-off-by: Sergey Semenov <[email protected]>
1 parent ac8ab8f commit c5f2cd0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

llvm/include/llvm/Support/PropertySetIO.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class PropertyValue {
100100
llvm_unreachable("must be BYTE_ARRAY value");
101101
SizeTy Res = 0;
102102

103-
for (auto I = 0; I < sizeof(SizeTy); ++I)
103+
for (size_t I = 0; I < sizeof(SizeTy); ++I)
104104
Res |= (SizeTy)Val.ByteArrayVal[I] << (8 * I);
105105
return Res;
106106
}

llvm/lib/Support/Base64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Base64Impl {
8080
size_t Off = 0;
8181

8282
// encode full byte triples
83-
for (auto TriB = 0; TriB < SrcSize / 3; ++TriB) {
83+
for (size_t TriB = 0; TriB < SrcSize / 3; ++TriB) {
8484
Off = TriB * 3;
8585
byte Byte0 = Src[Off++];
8686
byte Byte1 = Src[Off++];
@@ -116,7 +116,7 @@ class Base64Impl {
116116
size_t DstOff = 0;
117117

118118
// decode full quads
119-
for (auto Qch = 0; Qch < SrcSize / 4; ++Qch, SrcOff += 4, DstOff += 3) {
119+
for (size_t Qch = 0; Qch < SrcSize / 4; ++Qch, SrcOff += 4, DstOff += 3) {
120120
byte Ch[4];
121121
Expected<bool> TrRes = decode4(Src + SrcOff, Ch);
122122

llvm/lib/Support/PropertySetIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ PropertyValue::PropertyValue(const byte *Data, SizeTy DataBitSize) {
159159
Val.ByteArrayVal = new byte[SizeFieldSize + DataSize];
160160

161161
// Write the size into first bytes.
162-
for (auto I = 0; I < SizeFieldSize; ++I) {
162+
for (size_t I = 0; I < SizeFieldSize; ++I) {
163163
Val.ByteArrayVal[I] = (byte)DataBitSize;
164164
DataBitSize >>= ByteSizeInBits;
165165
}

0 commit comments

Comments
 (0)