Fix compile errors for newer gcc

blocking-uring-test
Vitaliy Filippov 2020-01-06 02:09:59 +03:00
parent b6f0c1cde5
commit d35ce8ab3d
2 changed files with 7 additions and 8 deletions

View File

@ -17,14 +17,14 @@ osd_read.o: osd_read.cpp osd.h osd_ops.h
osd_send.o: osd_send.cpp osd.h osd_ops.h
g++ $(CXXFLAGS) -c -o $@ $<
osd: $(BLOCKSTORE_OBJS) osd_main.cpp osd.h osd_ops.h osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o
g++ $(CXXFLAGS) -ltcmalloc_minimal -luring -o osd osd_main.cpp osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o $(BLOCKSTORE_OBJS)
g++ $(CXXFLAGS) -ltcmalloc_minimal -o osd osd_main.cpp osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o $(BLOCKSTORE_OBJS) -luring
test: test.cpp
g++ $(CXXFLAGS) -o test -luring test.cpp
g++ $(CXXFLAGS) -o test test.cpp -luring
test_blockstore: $(BLOCKSTORE_OBJS) test_blockstore.cpp
g++ $(CXXFLAGS) -o test_blockstore -ltcmalloc_minimal -luring test_blockstore.cpp $(BLOCKSTORE_OBJS)
g++ $(CXXFLAGS) -o test_blockstore -ltcmalloc_minimal test_blockstore.cpp $(BLOCKSTORE_OBJS) -luring
test_allocator: test_allocator.cpp allocator.o
g++ $(CXXFLAGS) -o test_allocator test_allocator.cpp allocator.o
libfio_blockstore.so: fio_engine.cpp $(BLOCKSTORE_OBJS)
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -luring -o libfio_blockstore.so fio_engine.cpp $(BLOCKSTORE_OBJS)
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -o libfio_blockstore.so fio_engine.cpp $(BLOCKSTORE_OBJS) -luring
libfio_sec_osd.so: fio_sec_osd.cpp osd_ops.h
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -luring -o libfio_sec_osd.so fio_sec_osd.cpp
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -o libfio_sec_osd.so fio_sec_osd.cpp -luring

View File

@ -23,7 +23,7 @@
#include <deque>
#include "blockstore.h"
#include "cpp-btree/btree_map.h"
#include "blockstore_impl.h"
static int setup_context(unsigned entries, struct io_uring *ring)
{
@ -52,7 +52,7 @@ static void test_write(struct io_uring *ring, int fd)
if (ret < 0)
printf("cqe failed: %d %s\n", ret, strerror(-ret));
else
printf("result: %d user_data: %d -> %d\n", ret, sqe->user_data, cqe->user_data);
printf("result: %d user_data: %lld -> %lld\n", ret, sqe->user_data, cqe->user_data);
io_uring_cqe_seen(ring, cqe);
free(buf);
}
@ -134,7 +134,6 @@ int main_vec(int argc, char *argv[])
for (int i = 0; i < 2048; i++)
{
int r = rand();
int n = 0;
auto it = v.begin();
for (; it != v.end(); it++)
if (it->iov_len >= r)