Harshit Sharma has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41963 )
Change subject: lib: Upgrade LZMA Decoder to version 19.0 ......................................................................
Patch Set 3:
(130 comments)
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h File src/lib/lzmadecode.h:
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@25 PS2, Line 25: #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
Macros with flow control statements should be avoided
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@38 PS2, Line 38: SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@99 PS2, Line 99: #define LzmaProps_GetNumProbs(p) (NUM_BASE_PROBS + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@121 PS2, Line 121: unsigned tempBufSize;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@141 PS2, Line 141: LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.h@145 PS2, Line 145: const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c File src/lib/lzmadecode.c:
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@18 PS2, Line 18: #define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defe […]
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@20 PS2, Line 20: #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@20 PS2, Line 20: #define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@21 PS2, Line 21: #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
macros should not use a trailing semicolon
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@21 PS2, Line 21: #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@21 PS2, Line 21: #define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@22 PS2, Line 22: #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@22 PS2, Line 22: #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
macros should not use a trailing semicolon
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@22 PS2, Line 22: #define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@23 PS2, Line 23: #define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
Macros with complex values should be enclosed in parentheses
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@24 PS2, Line 24: { UPDATE_0(p); i = (i + i); A0; } else \
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@25 PS2, Line 25: { UPDATE_1(p); i = (i + i) + 1; A1; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@29 PS2, Line 29: #define REV_BIT(p, i, A0, A1) IF_BIT_0(p + i) \
Macros with complex values should be enclosed in parentheses
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@30 PS2, Line 30: { UPDATE_0(p + i); A0; } else \
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@31 PS2, Line 31: { UPDATE_1(p + i); A1; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@33 PS2, Line 33: #define REV_BIT_CONST(p, i, m) REV_BIT(p, i, i += m;, i += m * 2;)
space required after that ';' (ctx:VxO)
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@37 PS2, Line 37: { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@40 PS2, Line 40: { i = 1; \
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@42 PS2, Line 42: TREE_GET_BIT(probs, i); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@43 PS2, Line 43: TREE_GET_BIT(probs, i); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@44 PS2, Line 44: TREE_GET_BIT(probs, i); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@45 PS2, Line 45: TREE_GET_BIT(probs, i); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@46 PS2, Line 46: TREE_GET_BIT(probs, i); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@47 PS2, Line 47: i -= 0x40; }
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@51 PS2, Line 51: matchByte += matchByte; \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@52 PS2, Line 52: bit = offs; \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@53 PS2, Line 53: offs &= matchByte; \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@54 PS2, Line 54: probLit = prob + (offs + bit + symbol); \
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@55 PS2, Line 55: GET_BIT2(probLit, symbol, offs ^= bit;, ;)
please, no spaces at the start of a line
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@55 PS2, Line 55: GET_BIT2(probLit, symbol, offs ^= bit;, ;)
space required after that ';' (ctx:VxO)
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@57 PS2, Line 57: #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@57 PS2, Line 57: #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defe […]
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@57 PS2, Line 57: #define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
Macros with flow control statements should be avoided
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@59 PS2, Line 59: #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@59 PS2, Line 59: #define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * (UInt32)ttt; if (code < bound)
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@60 PS2, Line 60: #define UPDATE_0_CHECK range = bound;
macros should not use a trailing semicolon
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@60 PS2, Line 60: #define UPDATE_0_CHECK range = bound;
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@61 PS2, Line 61: #define UPDATE_1_CHECK range -= bound; code -= bound;
macros should not use a trailing semicolon
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@61 PS2, Line 61: #define UPDATE_1_CHECK range -= bound; code -= bound;
Macros with multiple statements should be enclosed in a do - while loop
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@62 PS2, Line 62: #define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
Macros with complex values should be enclosed in parentheses
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@63 PS2, Line 63: { UPDATE_0_CHECK; i = (i + i); A0; } else \
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@64 PS2, Line 64: { UPDATE_1_CHECK; i = (i + i) + 1; A1; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@67 PS2, Line 67: { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@70 PS2, Line 70: #define REV_BIT_CHECK(p, i, m) IF_BIT_0_CHECK(p + i) \
Macros with complex values should be enclosed in parentheses
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@71 PS2, Line 71: { UPDATE_0_CHECK; i += m; m += m; } else \
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@72 PS2, Line 72: { UPDATE_1_CHECK; m += m; i += m; }
please, no spaces at the start of a line
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@85 PS2, Line 85: unsigned state = (unsigned)p->state;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@85 PS2, Line 85: unsigned state = (unsigned)p->state;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@87 PS2, Line 87: unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@87 PS2, Line 87: unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@88 PS2, Line 88: unsigned lc = p->prop.lc;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@89 PS2, Line 89: unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@89 PS2, Line 89: unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@89 PS2, Line 89: unsigned lpMask = ((unsigned)0x100 << p->prop.lp) - ((unsigned)0x100 >> lc);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@97 PS2, Line 97: unsigned len = 0;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@106 PS2, Line 106: unsigned ttt;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@107 PS2, Line 107: unsigned posState = CALC_POS_STATE(processedPos, pbMask);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@112 PS2, Line 112: unsigned symbol;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@116 PS2, Line 116: prob += (UInt32)3 * ((((processedPos << 8) + dic[(dicPos == 0 ? dicBufSize : dicPos) - 1]) & lpMask) << lc);
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@131 PS2, Line 131: unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@131 PS2, Line 131: unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@132 PS2, Line 132: unsigned offs = 0x100;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@135 PS2, Line 135: unsigned bit;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@173 PS2, Line 173: dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@195 PS2, Line 195: } else {
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@225 PS2, Line 225: probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@233 PS2, Line 233: TREE_DECODE(probLen, (1 << kLenNumHighBits), len);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@241 PS2, Line 241: ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@244 PS2, Line 244: unsigned posSlot = (unsigned)distance;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@244 PS2, Line 244: unsigned posSlot = (unsigned)distance;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@245 PS2, Line 245: unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@245 PS2, Line 245: unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@245 PS2, Line 245: unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@253 PS2, Line 253: do {
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@255 PS2, Line 255: } while (--numDirectBits);
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@260 PS2, Line 260: do {
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@266 PS2, Line 266: t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@267 PS2, Line 267: distance = (distance << 1) + (t + 1);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@278 PS2, Line 278: } while (--numDirectBits);
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@282 PS2, Line 282: unsigned i = 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@286 PS2, Line 286: REV_BIT_LAST (prob, i, 8);
space prohibited between function name and open parenthesis '('
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@289 PS2, Line 289: if (distance == (UInt32)0xFFFFFFFF) {
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@300 PS2, Line 300: state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@301 PS2, Line 301: if (distance >= (checkDicSize == 0 ? processedPos : checkDicSize)) {
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@311 PS2, Line 311: unsigned curLen;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@318 PS2, Line 318: curLen = ((rem < len) ? (unsigned)rem : len);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@335 PS2, Line 335: if (++pos == dicBufSize)
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@365 PS2, Line 365: unsigned len = (unsigned)p->remainLen;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@365 PS2, Line 365: unsigned len = (unsigned)p->remainLen;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@369 PS2, Line 369: len = (unsigned)(rem);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@388 PS2, Line 388: #define kBadRepCode (kBound0 + (((kRange0 - kBound0) >> kNumBitModelTotalBits) << (kNumBitModelTotalBits - 1)))
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@429 PS2, Line 429: unsigned state = (unsigned)p->state;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@429 PS2, Line 429: unsigned state = (unsigned)p->state;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@435 PS2, Line 435: unsigned ttt;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@436 PS2, Line 436: unsigned posState = CALC_POS_STATE(p->processedPos, (1 << p->prop.pb) - 1);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@448 PS2, Line 448: ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@449 PS2, Line 449: (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
line over 96 characters
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@452 PS2, Line 452: unsigned symbol = 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@453 PS2, Line 453: do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@455 PS2, Line 455: unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@457 PS2, Line 457: unsigned offs = 0x100;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@458 PS2, Line 458: unsigned symbol = 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@460 PS2, Line 460: unsigned bit;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@466 PS2, Line 466: GET_BIT2_CHECK(probLit, symbol, offs ^= bit; , ;)
space prohibited before that ',' (ctx:WxW)
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@471 PS2, Line 471: unsigned len;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@518 PS2, Line 518: unsigned limit, offset;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@532 PS2, Line 532: probLen = prob + LenLow + GET_LEN_STATE + (1 << kLenNumLowBits);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@547 PS2, Line 547: unsigned posSlot;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@549 PS2, Line 549: ((len < kNumLenToPosStates - 1 ? len : kNumLenToPosStates - 1) <<
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@553 PS2, Line 553: unsigned numDirectBits = ((posSlot >> 1) - 1);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@564 PS2, Line 564: code -= range & (((code - range) >> 31) - 1);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@566 PS2, Line 566: } while (--numDirectBits);
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@571 PS2, Line 571: unsigned i = 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@572 PS2, Line 572: unsigned m = 1;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@575 PS2, Line 575: } while (--numDirectBits);
Too many leading tabs - consider code refactoring
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@647 PS2, Line 647: while (p->remainLen != kMatchSpecLenStart) {
suspect code indent for conditional statements (8, 24)
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@673 PS2, Line 673: p->tempBufSize = (unsigned)inSize;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@693 PS2, Line 693: unsigned rem = p->tempBufSize, lookAhead = 0;
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@698 PS2, Line 698: int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, (SizeT)rem);
line over 96 characters
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@713 PS2, Line 713: unsigned kkk = (unsigned)(p->buf - p->tempBuf);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@713 PS2, Line 713: unsigned kkk = (unsigned)(p->buf - p->tempBuf);
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@734 PS2, Line 734: SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
Prefer 'unsigned int' to bare use of 'unsigned'
Done
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@741 PS2, Line 741: else
else is not generally useful after a break or return
Ack
https://review.coreboot.org/c/coreboot/+/41963/2/src/lib/lzmadecode.c@742 PS2, Line 742: dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
line over 96 characters
Done