Menu

shiftNegative error false

2026-02-26
2026-02-26
  • Bassam Abdul-Baki

    I'm getting an error for the following line of code. The if statement forces it to be a positive shift value. Sadly, it's not my code.

    if (bit_count < 0)
    {
        /*+ shift out the extra bits */
    
        * ((UNSIGNED_32 *) extract_value_ptr) >>= (0 - bit_count);
    }
    
     
  • CHR

    CHR - 2026-02-26

    Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14540

     

Log in to post a comment.

MongoDB Logo MongoDB