Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80846 - branches/release/boost/uuid
From: atompkins_at_[hidden]
Date: 2012-10-04 13:05:30


Author: atompkins
Date: 2012-10-04 13:05:29 EDT (Thu, 04 Oct 2012)
New Revision: 80846
URL: http://svn.boost.org/trac/boost/changeset/80846

Log:
seed_rng.hpp - removed incorrect comment
seed_rng.hpp - used ignore_size() to get rid of warnings
seed_rng.hpp - initialize m_value in generator_iterator constructor
sha1.hpp - added #include <string> as std::runtime_error constructor needs it
Text files modified:
   branches/release/boost/uuid/seed_rng.hpp | 12 ++++--------
   branches/release/boost/uuid/sha1.hpp | 1 +
   2 files changed, 5 insertions(+), 8 deletions(-)

Modified: branches/release/boost/uuid/seed_rng.hpp
==============================================================================
--- branches/release/boost/uuid/seed_rng.hpp (original)
+++ branches/release/boost/uuid/seed_rng.hpp 2012-10-04 13:05:29 EDT (Thu, 04 Oct 2012)
@@ -109,9 +109,10 @@
     }
 
 private:
+ inline void ignore_size(size_t) {}
+
     static unsigned int * sha1_random_digest_state_()
     {
- // intentionally left uninitialized
         static unsigned int state[ 5 ];
         return state;
     }
@@ -153,12 +154,7 @@
 
             if(random_)
             {
- // the not_used variable is to suppress warnings
-#if defined(__GNUC__)
- __attribute__((unused))
-#endif
- size_t not_used = 0;
- not_used = std::fread( buffer, 1, 20, random_ );
+ ignore_size(std::fread( buffer, 1, 20, random_ ));
             }
 
             // using an uninitialized buffer[] if fopen fails
@@ -218,7 +214,7 @@
> super_t;
 
  public:
- generator_iterator() : m_g(NULL) {}
+ generator_iterator() : m_g(NULL), m_value(0) {}
     generator_iterator(Generator* g) : m_g(g), m_value((*m_g)()) {}
 
     void increment()

Modified: branches/release/boost/uuid/sha1.hpp
==============================================================================
--- branches/release/boost/uuid/sha1.hpp (original)
+++ branches/release/boost/uuid/sha1.hpp 2012-10-04 13:05:29 EDT (Thu, 04 Oct 2012)
@@ -19,6 +19,7 @@
 #include <stdexcept>
 #include <boost/throw_exception.hpp>
 #include <cstddef>
+#include <string>
 
 #ifdef BOOST_NO_STDC_NAMESPACE
 namespace std {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk