Skip to content

[lldb] Fix few easily correctable warnings #1990

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

Merged
merged 1 commit into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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 lldb/source/Expression/REPL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static bool ReadCode(const std::string &path, std::string &code,
const size_t max_size = code.max_size();
if (file_size > max_size) {
error_sp->Printf("file at path '%s' too large: "
"file_size = %llu, max_size = %llu\n",
"file_size = %zu, max_size = %zu\n",
path.c_str(), file_size, max_size);
return false;
}
Expand Down
8 changes: 0 additions & 8 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8342,14 +8342,6 @@ bool SwiftASTContext::CacheUserImports(SwiftASTContext &swift_ast_context,
Status &error) {
llvm::SmallString<1> m_description;

swift::ModuleDecl::ImportFilter import_filter {
Copy link
Author

@kastiglione kastiglione Oct 17, 2020

Choose a reason for hiding this comment

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

@medismailben I believe this unused var is left over from your recent PR.

swift::ModuleDecl::ImportFilterKind::Exported,
swift::ModuleDecl::ImportFilterKind::Default,
swift::ModuleDecl::ImportFilterKind::ImplementationOnly,
swift::ModuleDecl::ImportFilterKind::SPIAccessControl,
swift::ModuleDecl::ImportFilterKind::ShadowedByCrossImportOverlay
};

auto *persistent_expression_state =
sc.target_sp->GetSwiftPersistentExpressionState(exe_scope);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ llvm::Optional<uint64_t> SwiftLanguageRuntimeImpl::GetMemberVariableOffset(
}
if (offset) {
LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES),
"[GetMemberVariableOffset] offset of %s is %d",
"[GetMemberVariableOffset] offset of %s is %lld",
member_name.str().c_str(), *offset);
} else {
LLDB_LOGF(GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES),
Expand Down Expand Up @@ -2033,7 +2033,7 @@ bool SwiftLanguageRuntime::IsTaggedPointer(lldb::addr_t addr,
// Check whether this is a reference to an Objective-C object.
if ((addr & 1) == 1)
return true;
}
} break;
default:
break;
}
Expand Down Expand Up @@ -2098,7 +2098,7 @@ lldb::addr_t SwiftLanguageRuntime::FixupAddress(lldb::addr_t addr,
if (extra_deref)
return refd_addr;
}
}
} break;
default:
break;
}
Expand Down