Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apps] Fix virtual destructor for abstract struct SrtStatData #1771

Merged
merged 2 commits into from
Jan 29, 2021

Conversation

maxsharabayko
Copy link
Collaborator

Added virtual destructor for abstract struct SrtStatData.
A build warning after #1743.

/c++/v1/memory:2368:5: warning: delete called on 'SrtStatData' that is abstract but has non-virtual destructor
      [-Wdelete-abstract-non-virtual-dtor]
    delete __ptr;
    ^
/c++/v1/memory:2623:7: note: in instantiation of member function 'std::__1::default_delete<SrtStatData>::operator()'
      requested here
      __ptr_.second()(__tmp);
      ^
/c++/v1/memory:2577:19: note: in instantiation of member function 'std::__1::unique_ptr<SrtStatData,
      std::__1::default_delete<SrtStatData> >::reset' requested here
  ~unique_ptr() { reset(); }
                  ^
/c++/v1/memory:1936:64: note: in instantiation of member function 'std::__1::unique_ptr<SrtStatData,
      std::__1::default_delete<SrtStatData> >::~unique_ptr' requested here
    _LIBCPP_INLINE_VISIBILITY void destroy(pointer __p) {__p->~_Tp();}
                                                               ^
/c++/v1/memory:1798:18: note: in instantiation of member function 'std::__1::allocator<std::__1::unique_ptr<SrtStatData,
      std::__1::default_delete<SrtStatData> > >::destroy' requested here
            {__a.destroy(__p);}
                 ^
/c++/v1/memory:1635:14: note: in instantiation of function template specialization
      'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > > >::__destroy<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> >
      >' requested here
            {__destroy(__has_destroy<allocator_type, _Tp*>(), __a, __p);}
             ^
/c++/v1/vector:426:25: note: in instantiation of function template specialization
      'std::__1::allocator_traits<std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > > >::destroy<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > >'
      requested here
        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end));
                        ^
/c++/v1/vector:369:29: note: in instantiation of member function
      'std::__1::__vector_base<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> >, std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > >
      >::__destruct_at_end' requested here
    void clear() _NOEXCEPT {__destruct_at_end(__begin_);}
                            ^
/c++/v1/vector:463:9: note: in instantiation of member function
      'std::__1::__vector_base<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> >, std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > > >::clear'
      requested here
        clear();
        ^
/c++/v1/vector:495:5: note: in instantiation of member function
      'std::__1::__vector_base<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> >, std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > >
      >::~__vector_base' requested here
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    ^
/apps/apputil.cpp:364:33: note: in instantiation of member function 'std::__1::vector<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> >,
      std::__1::allocator<std::__1::unique_ptr<SrtStatData, std::__1::default_delete<SrtStatData> > > >::vector' requested here
vector<unique_ptr<SrtStatData>> g_SrtStatsTable;

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [apps] Area: Test applications related improvements labels Jan 29, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Jan 29, 2021
@maxsharabayko maxsharabayko merged commit 85e3013 into Haivision:master Jan 29, 2021
@maxsharabayko maxsharabayko deleted the hotfix/app-srtstatdata branch January 29, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[apps] Area: Test applications related improvements Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants