Modify

Ticket #7174 (closed Bugs: fixed)

Opened 21 months ago

Last modified 17 months ago

Declaration shadows a local variable (hashtable.hpp)

Reported by: Alexandre Hamez <alexandre.hamez@…> Owned by: igaztanaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.51.0 Severity: Cosmetic
Keywords: Cc:

Description

When compiling Intrusive with -Wshadow:

/opt/local/include/boost/intrusive/hashtable.hpp:438:19: warning: declaration shadows a local variable [-Wshadow]
         node_ptr first_in_group =
                  ^
/opt/local/include/boost/intrusive/hashtable.hpp:429:12: note: previous declaration is here
      bool first_in_group = node_traits::get_next(prev_in_group_ptr) != to_erase_ptr;
           ^
/opt/local/include/boost/intrusive/hashtable.hpp:2169:20: warning: declaration shadows a local variable [-Wshadow]
         size_type bucket_len = priv_buckets_len();
                   ^
/opt/local/include/boost/intrusive/hashtable.hpp:2162:17: note: previous declaration is here
      size_type bucket_len = priv_buckets_len();
                ^
/opt/local/include/boost/intrusive/hashtable.hpp:3016:23: warning: declaration shadows a local variable [-Wshadow]
         bucket_type &b = this->priv_buckets()[bucket_number_second];
                      ^
/opt/local/include/boost/intrusive/hashtable.hpp:2977:20: note: previous declaration is here
      bucket_type &b = this->priv_buckets()[bucket_number_first];
                   ^
3 warnings generated.

Attachments

Change History

comment:1 Changed 17 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

All -Wshadow warnings removed in trunk and release branches. Thanks for the report.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.