mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-18 10:15:13 +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 \
|
||||
cr_filename
|
||||
|
||||
junk_data_SOURCES = junk_data.c
|
||||
junk_data_SOURCES = junk_data.cc
|
||||
write_multiblock_SOURCES = write_multiblock.cc
|
||||
mknod_test_SOURCES = mknod_test.c
|
||||
truncate_read_file_SOURCES = truncate_read_file.c
|
||||
cr_filename_SOURCES = cr_filename.c
|
||||
mknod_test_SOURCES = mknod_test.cc
|
||||
truncate_read_file_SOURCES = truncate_read_file.cc
|
||||
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:
|
||||
|
@ -34,7 +34,7 @@ int main(int argc, const char *argv[])
|
||||
for (i = 0; i < count; i += sizeof(buf)) {
|
||||
long long 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user