diff --git a/test/Makefile.am b/test/Makefile.am index 11f7667..5bb7210 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -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: diff --git a/test/cr_filename.c b/test/cr_filename.cc similarity index 100% rename from test/cr_filename.c rename to test/cr_filename.cc diff --git a/test/junk_data.c b/test/junk_data.cc similarity index 95% rename from test/junk_data.c rename to test/junk_data.cc index e4ff76c..bf64c48 100644 --- a/test/junk_data.c +++ b/test/junk_data.cc @@ -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(buf) + j) = i / sizeof(i) + j; } fwrite(buf, 1, sizeof(buf) > count - i ? count - i : sizeof(buf), stdout); } diff --git a/test/mknod_test.c b/test/mknod_test.cc similarity index 100% rename from test/mknod_test.c rename to test/mknod_test.cc diff --git a/test/truncate_read_file.c b/test/truncate_read_file.cc similarity index 100% rename from test/truncate_read_file.c rename to test/truncate_read_file.cc