mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-22 08:48:55 +00:00
Convert test binaries to C++ (#2235)
This ensures that they are compiled with a consistent compiler and set of flags as the rest of s3fs.
This commit is contained in:
parent
a4a2841c05
commit
38a1ff42e5
@ -36,11 +36,20 @@ noinst_PROGRAMS = \
|
|||||||
truncate_read_file \
|
truncate_read_file \
|
||||||
cr_filename
|
cr_filename
|
||||||
|
|
||||||
junk_data_SOURCES = junk_data.c
|
junk_data_SOURCES = junk_data.cc
|
||||||
write_multiblock_SOURCES = write_multiblock.cc
|
write_multiblock_SOURCES = write_multiblock.cc
|
||||||
mknod_test_SOURCES = mknod_test.c
|
mknod_test_SOURCES = mknod_test.cc
|
||||||
truncate_read_file_SOURCES = truncate_read_file.c
|
truncate_read_file_SOURCES = truncate_read_file.cc
|
||||||
cr_filename_SOURCES = cr_filename.c
|
cr_filename_SOURCES = cr_filename.cc
|
||||||
|
|
||||||
|
clang-tidy:
|
||||||
|
clang-tidy \
|
||||||
|
$(junk_data_SOURCES) \
|
||||||
|
$(write_multiblock_SOURCES) \
|
||||||
|
$(mknod_test_SOURCES) \
|
||||||
|
$(truncate_read_file_SOURCES) \
|
||||||
|
$(cr_filename_SOURCES) \
|
||||||
|
-- $(DEPS_CFLAGS) $(CPPFLAGS)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Local variables:
|
# Local variables:
|
||||||
|
@ -34,7 +34,7 @@ int main(int argc, const char *argv[])
|
|||||||
for (i = 0; i < count; i += sizeof(buf)) {
|
for (i = 0; i < count; i += sizeof(buf)) {
|
||||||
long long j;
|
long long j;
|
||||||
for (j = 0; j < sizeof(buf) / sizeof(i); ++j) {
|
for (j = 0; j < sizeof(buf) / sizeof(i); ++j) {
|
||||||
*((long long *)buf + j) = i / sizeof(i) + j;
|
*(reinterpret_cast<long long *>(buf) + j) = i / sizeof(i) + j;
|
||||||
}
|
}
|
||||||
fwrite(buf, 1, sizeof(buf) > count - i ? count - i : sizeof(buf), stdout);
|
fwrite(buf, 1, sizeof(buf) > count - i ? count - i : sizeof(buf), stdout);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user