librdkafka
librdkafka copied to clipboard
remove useless const modifier
The 'const' modifier in these functions serves no purpose. However, it will cause GCC or Clang to generate a warning in a file where rdkafka.h is included, which will result in a compilation failure if -Werror is enabled .
/sem-approve
For searchability for others hitting the same error here is the complete error message generated by gcc:
librdkafka/rdkafka.h:8205:11: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
clang says:
warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
Rebased master
Duplicates #4556 and #4504 (but yes, @emasab or someone, please merge either one of these already, and close the other!)