Fix build under clang and some warnings

Build problems fixed:
- void* pointer arithmetic which is a GNU extension (works as byte*)
- "variable size object may not be initialized" which is OK under GCC
- nullptr_t related error in json11 (it lacks 'operator <' in clang)

Warnings fixed:
- empty nested struct initializer { 0 } replaced by {}
- removed several unused lambda captures
This commit is contained in:
Vitaliy Filippov
2022-01-16 00:02:54 +03:00
parent 8f64fc61e7
commit 7bdd92ca4f
34 changed files with 209 additions and 200 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ int bind_stub(std::string bind_address, int bind_port)
void run_stub(int peer_fd)
{
osd_any_op_t op;
osd_any_reply_t reply = { 0 };
osd_any_reply_t reply = {};
void *buf = NULL;
while (1)
{