Skip to content

Conversation

LeonhardFS
Copy link

@LeonhardFS LeonhardFS commented Aug 3, 2025

Hey, thanks for sharing the code online!

Wanted to try it out, and everything works very smoothly except for a warning that leads to an error given the -Werror setting. Submitting a quick one-liner fix here.

Error log:

.../AnyBlob/test/unit/network/send_receiver_test.cpp: In function ‘void anyblob::network::test::C_A_T_C_H_T_E_S_T_0()’:
.../AnyBlob/test/unit/network/send_receiver_test.cpp:60:37: error: ‘skip’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   60 |                     REQUIRE(!strncmp(reinterpret_cast<char*>(currentMessage.get()) + skip, reinterpret_cast<char*>(message.getData()) + message.getOffset(), message.getSize()));
      |                                     ^
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unqualified-std-cast-call’ may have been intended to silence earlier diagnostics
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/tester.dir/build.make:202: CMakeFiles/tester.dir/test/unit/network/send_receiver_test.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:113: CMakeFiles/tester.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

My platform:

Ubuntu 22.04.03
CMake 3.22.1 (also tried with 3.31)
GCC 11.4

Let me know if this acceptable or you'd like me to make additional changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant