redpanda-data / redpanda

Redpanda is a streaming data platform for developers. Kafka API compatible. 10x faster. No ZooKeeper. No JVM!
https://redpanda.com
9.46k stars 579 forks source link

cloud_roles: fix unused return value warning #23491

Closed dotnwat closed 2 days ago

dotnwat commented 2 days ago
/home/nwatkins/src/redpanda-clang-18/src/v/cloud_roles/tests/credential_tests.cc:89:9: error: the value returned by this function should not be disregarded; neglecting it may lead to errors [bugprone-unused-return-value,-warnings-as-errors]
   89 |         applier.add_auth(h);
      |         ^~~~~~~~~~~~~~~~~~~
/home/nwatkins/src/redpanda-clang-18/src/v/cloud_roles/tests/credential_tests.cc:99:9: error: the value returned by this function should not be disregarded; neglecting it may lead to errors [bugprone-unused-return-value,-warnings-as-errors]
   99 |         applier.add_auth(h);
      |  
       ^~~~~~~~~~~~~~~~~~~

Backports Required

Release Notes

dotnwat commented 2 days ago

only affected unit tests, and those passed.

dotnwat commented 2 days ago

nice q (for my own benefit): did the default behavior of bugprone-unused-return-value change or are we changing the config?

@oleiman it seems that clang-tidy-18 caught this while clang-tidy-16 did not.