Re: [Boost-bugs] [Boost C++ Libraries] #4601: conversion from 'unsigned long' to 'boost::uint8_t warning

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4601: conversion from 'unsigned long' to 'boost::uint8_t warning
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-14 15:47:58


#4601: conversion from 'unsigned long' to 'boost::uint8_t warning
------------------------------------------------+---------------------------
  Reporter: Jeff Flinn <jflinn@…> | Owner: atompkins
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: uuid
   Version: Boost 1.44.0 | Severity: Cosmetic
Resolution: | Keywords:
------------------------------------------------+---------------------------

Comment (by marshall):

 Here's the line of code:
 {{{
             *it = ((random_value >> (i*8)) & 0xFF);
 }}}

 As you can see, there's no loss of data here, since the value is anded
 with 0xFF before being stored into the iterator.
 The compiler is just being a PITA.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4601#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC