diff --git a/dbms/src/IO/tests/valid_utf8.cpp b/dbms/src/IO/tests/valid_utf8.cpp index ccf176386f9..7033574b99d 100644 --- a/dbms/src/IO/tests/valid_utf8.cpp +++ b/dbms/src/IO/tests/valid_utf8.cpp @@ -13,10 +13,10 @@ int main(int argc, char ** argv) { std::string test1 = "kjhsgdfkjhg2378rtzgvxkz877%^&^*%&^*&*"; std::string test2 = "{\"asd\" = \"qw1\",\"qwe24\" = \"3asd\"}"; - test2[test2.find("1")] = char(127 + 64); - test2[test2.find("2")] = char(127 + 64 + 32); - test2[test2.find("3")] = char(127 + 64 + 32 + 16); - test2[test2.find("4")] = char(127 + 64 + 32 + 16 + 8); + test2[test2.find('1')] = char(127 + 64); + test2[test2.find('2')] = char(127 + 64 + 32); + test2[test2.find('3')] = char(127 + 64 + 32 + 16); + test2[test2.find('4')] = char(127 + 64 + 32 + 16 + 8); std::string str; { diff --git a/dbms/src/Storages/tests/seek_speed_test.cpp b/dbms/src/Storages/tests/seek_speed_test.cpp index bb06f7b95bf..3d5e8bcc6d2 100644 --- a/dbms/src/Storages/tests/seek_speed_test.cpp +++ b/dbms/src/Storages/tests/seek_speed_test.cpp @@ -33,7 +33,7 @@ int main(int argc, const char ** argv) UInt64 size = Poco::File(argv[1]).getSize(); UInt64 pos = 0; DB::ReadBufferFromFile in(argv[1], buf_size); - char * buf = new char[block]; + auto buf = std::make_unique(block); int checksum = 0; UInt64 bytes_read = 0;