Ticket #5145: 0002-Fixed-warning-use-of-logical-with-constant-operand-s.patch

File 0002-Fixed-warning-use-of-logical-with-constant-operand-s.patch, 1.1 KB (added by anonymous, 12 years ago)
  • boost/uuid/name_generator.hpp

    From 66d12b3ee1e1ca90e01dd091eeb954f7745cbfd6 Mon Sep 17 00:00:00 2001
    From: Vasyl' Vavrychuk <vvavrychuk@gmail.com>
    Date: Thu, 16 Dec 2010 12:28:14 +0200
    Subject: [PATCH 2/3] Fixed warning: use of logical && with constant operand; switch to bitwise & or remove constant [-Wconstant-logical-operand]
    
    ---
     boost/uuid/name_generator.hpp |    8 ++++----
     1 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/boost/uuid/name_generator.hpp b/boost/uuid/name_generator.hpp
    index 42473a6..507f8e8 100644
    a b private:  
    7171
    7272        for (size_t i=0; i<count; i++) {
    7373            uint32_t c = characters[i];
    74             sha.process_byte( (c >> 0) && 0xFF );
    75             sha.process_byte( (c >> 8) && 0xFF );
    76             sha.process_byte( (c >> 16) && 0xFF );
    77             sha.process_byte( (c >> 24) && 0xFF );
     74            sha.process_byte( (c >> 0) & 0xFF );
     75            sha.process_byte( (c >> 8) & 0xFF );
     76            sha.process_byte( (c >> 16) & 0xFF );
     77            sha.process_byte( (c >> 24) & 0xFF );
    7878        }
    7979    }
    8080