Boost logo

Boost Users :

Subject: [Boost-users] [Boost-CRC] Warnings in crc_32_type
From: tamas.ruszkai_at_[hidden]
Date: 2017-04-21 10:42:50


Hi,

I use bosst 1.63 and want to instantiate a boost::crc_32_type and I get the following warnings:


boost\1.63.0\boost/crc.hpp(578): warning C4244: 'return': conversion from 'unsigned int' to 'unsigned char', possible loss of data

I guess the compiler is right because the code wants to convert from 32bit integer to 8bit integer without explicitly casting it:

        static  unsigned char  index( value_type rem, unsigned char x )
            { return x ^ rem; }




boost\1.63.0\boost/crc.hpp(377): warning C4245: 'initializing': conversion from 'int' to 'const boost::detail::mask_uint_t<8>::least', signed/unsigned mismatch
Another warning because of signed/unsigned mismatch.

At the moment I just suppress those warnings, but for the sake of beauty it would make sense to fix these issues.

Regards,
Tamas Ruszkai

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net