Remove warning "implicit conversion changes signedness" in jpegCodecBaseImpl.cpp

Issue #196 closed
Paolo Brandoli repo owner created an issue

/Users/vagrant/git/imebra/library/implementation/jpegCodecBaseImpl.cpp:1307:95: warning: implicit conversion changes signedness: 'int' to 'std::uint32_t' (aka 'unsigned int') [-Wsign-conversion]

                    tagLength = (std::uint16_t)(tagLength + (pHuffman->getValuesPerLength(++scanLength)));
                                                                       ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~

/Users/vagrant/git/imebra/library/implementation/jpegCodecBaseImpl.cpp:1325:72: warning: implicit conversion changes signedness: 'int' to 'std::uint32_t' (aka 'unsigned int') [-Wsign-conversion]

                byte = (std::uint8_t)(pHuffman->getValuesPerLength(++scanLength));
                                                ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~

/Users/vagrant/git/imebra/library/implementation/jpegCodecBaseImpl.cpp:1334:107: warning: implicit conversion changes signedness: 'int' to 'std::uint32_t' (aka 'unsigned int') [-Wsign-conversion]

                for(std::uint32_t scanValues = 0; scanValues < pHuffman->getValuesPerLength(scanLength+1); ++scanValues)
                                                                         ~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~^~

Comments (3)

  1. Log in to comment