Modify

Opened 5 years ago

Closed 5 years ago

#7174 closed Bugs (fixed)

Declaration shadows a local variable (hashtable.hpp)

Reported by: Alexandre Hamez <alexandre.hamez@…> Owned by: Ion Gaztañaga
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 (0)

Change History (1)

comment:1 Changed 5 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.