mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-26 03:53:58 +08:00
Pool allocator fallout: fix uninialized class members.
* alloc-pool.h (pool_allocator::pool_allocator): Set implicit values to avoid -Wmaybe-uninitialized errors. From-SVN: r224030
This commit is contained in:
parent
71fa02e0d8
commit
755afe2e51
@ -1,3 +1,8 @@
|
||||
2015-06-02 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* alloc-pool.h (pool_allocator::pool_allocator): Set implicit
|
||||
values to avoid -Wmaybe-uninitialized errors.
|
||||
|
||||
2015-06-02 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR debug/65549
|
||||
|
@ -159,11 +159,11 @@ template <typename T>
|
||||
inline
|
||||
pool_allocator<T>::pool_allocator (const char *name, size_t num,
|
||||
size_t extra_size, bool ignore_type_size):
|
||||
m_name (name), m_elts_per_block (num), m_returned_free_list (NULL),
|
||||
m_name (name), m_id (0), m_elts_per_block (num), m_returned_free_list (NULL),
|
||||
m_virgin_free_list (NULL), m_virgin_elts_remaining (0), m_elts_allocated (0),
|
||||
m_elts_free (0), m_blocks_allocated (0), m_block_list (NULL),
|
||||
m_ignore_type_size (ignore_type_size), m_extra_size (extra_size),
|
||||
m_initialized (false) {}
|
||||
m_block_size (0), m_ignore_type_size (ignore_type_size),
|
||||
m_extra_size (extra_size), m_initialized (false) {}
|
||||
|
||||
/* Initialize a pool allocator. */
|
||||
|
||||
@ -215,7 +215,6 @@ pool_allocator<T>::initialize ()
|
||||
|
||||
m_id = last_id;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* Free all memory allocated for the given memory pool. */
|
||||
|
Loading…
Reference in New Issue
Block a user