librdkafka icon indicating copy to clipboard operation
librdkafka copied to clipboard

remove useless const modifier

Open JustAGod1 opened this issue 1 year ago • 5 comments

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 .

JustAGod1 avatar Jan 12 '24 14:01 JustAGod1

CLA assistant check
All committers have signed the CLA.

cla-assistant[bot] avatar Jan 12 '24 14:01 cla-assistant[bot]

/sem-approve

emasab avatar Jan 19 '24 15:01 emasab

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]

wanders avatar Jan 23 '24 14:01 wanders

Rebased master

JustAGod1 avatar Feb 14 '24 12:02 JustAGod1

Duplicates #4556 and #4504 (but yes, @emasab or someone, please merge either one of these already, and close the other!)

Quuxplusone avatar Apr 01 '24 02:04 Quuxplusone