Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 3004,2897,2931,2914 #3301

Merged
merged 4 commits into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbms/src/Common/RedactHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ std::string Redact::keyToHexString(const char * key, size_t size)
char * pos = buf.data();
for (size_t i = 0; i < size; ++i)
{
writeHexByteUppercase((UInt8)(key[i]), pos);
writeHexByteUppercase(static_cast<UInt8>(key[i]), pos);
pos += 2;
}
return buf;
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Common/RedactHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Redact
public:
static void setRedactLog(bool v);

static std::string handleToDebugString(const DB::HandleID handle);
static std::string handleToDebugString(DB::HandleID handle);
static std::string keyToDebugString(const char * key, size_t size);

static std::string keyToHexString(const char * key, size_t size);
Expand All @@ -25,7 +25,7 @@ class Redact
friend class DB::FieldVisitorToDebugString;

protected:
Redact() {}
Redact() = default;

private:
// Log user data to log only when this flag is set to false.
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Common/SharedLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void * SharedLibrary::getImpl(const std::string & name, bool no_throw)
{
dlerror();

auto res = dlsym(handle, name.c_str());
auto *res = dlsym(handle, name.c_str());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto *res = dlsym(handle, name.c_str());
auto * res = dlsym(handle, name.c_str());


if (char * error = dlerror())
{
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Common/SimpleIncrement.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct SimpleIncrement
{
std::atomic<UInt64> value;

SimpleIncrement(UInt64 start = 0)
explicit SimpleIncrement(UInt64 start = 0)
: value(start)
{}

Expand Down