Ticket #9881: 0001-crc-fix-GCC-Wshadow-warnings.patch

File 0001-crc-fix-GCC-Wshadow-warnings.patch, 1.1 KB (added by mstahl@…, 9 years ago)
  • include/boost/crc.hpp

    From 81ab1a7584064aa94befae51f8c98bb6d9ecdb4a Mon Sep 17 00:00:00 2001
    From: Stephan Bergmann <sbergman@redhat.com>
    Date: Sun, 13 Apr 2014 23:46:54 +0200
    Subject: [PATCH] crc: fix GCC -Wshadow warnings
    
    Signed-off-by: Michael Stahl <mstahl@redhat.com>
    ---
     include/boost/crc.hpp | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/include/boost/crc.hpp b/include/boost/crc.hpp
    index 6be5aa1..e21fbc1 100644
    a b void  
    755755crc_basic<Bits>::process_bits
    756756(
    757757    unsigned char  bits,
    758     std::size_t    bit_count
     758    std::size_t    bit_count_
    759759)
    760760{
    761761    // ignore the bits above the ones we want
    762     bits <<= CHAR_BIT - bit_count;
     762    bits <<= CHAR_BIT - bit_count_;
    763763
    764764    // compute the CRC for each bit, starting with the upper ones
    765765    unsigned char const  high_bit_mask = 1u << ( CHAR_BIT - 1u );
    766     for ( std::size_t i = bit_count ; i > 0u ; --i, bits <<= 1u )
     766    for ( std::size_t i = bit_count_ ; i > 0u ; --i, bits <<= 1u )
    767767    {
    768768        process_bit( static_cast<bool>(bits & high_bit_mask) );
    769769    }