Skip to content

CPP client compilation issues. #7502

Description

@tongsucn

Describe the bug

When enabling -Wall and -Werror, the library cannot be successfully compiled:

  1. Non-virtual destructor in base class: pulsar-client-cpp/lib/auth/AuthOauth2.h:47:7: error: base class 'class pulsar::CachedToken' has accessible non-virtual destructor [-Werror=non-virtual-dtor].
  2. Unnecessary NULL checking on function pointer: /pulsar-client-cpp/lib/ClientImpl.cc:100:10: error: the address of 'pulsar::Logger* logger()' will never be NULL [-Werror=address].

To Reproduce

Compile with -Wall and -Werror.

Desktop (please complete the following information):

  • OS: Linux
  • Compiler: GCC 7.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe PR fixed a bug or issue reported a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions