Don, Coverity is complaining about this code, would you please take a look?
*** CID 1248178: Wrong operator used (CONSTANT_EXPRESSION_RESULT) /src/cursor/cur_json.c: 900 in __wt_json_strncpy() 894 /* RFC 3629 */ 895 if (hi >= 0x8) { 896 /* 3 bytes total */ 897 /* byte 0: 1110HHHH */ 898 /* byte 1: 10HHHHLL */ 899 /* byte 2: 10LLLLLL */ >>> CID 1248178: Wrong operator used (CONSTANT_EXPRESSION_RESULT) >>> "(hi << 4) & 0xf" is always 0 regardless of the values of its operands. This occurs as the bitwise second operand of '|'. Did you intend to use right-shift ('>>') in "hi << 4"? 900 *dst++ = (char)(0xe0 | 901 ((hi << 4) & 0x0f)); 902 *dst++ = (char)(0x80 | 903 ((hi << 2) & 0x3c) | 904 ((lo >> 6) & 0x03)); 905 *dst++ = (char)(0x80 | (lo & 0x3f));
- related to
-
WT-1298 Json load lint
- Closed