Skip to content

Commit

Permalink
Target: silence a GCC warning
Browse files Browse the repository at this point in the history
GCC emits a warning:
    warning: enumeral and non-enumeral type in conditional expression [enabled by default]
which does not seem to have a flag to control it.  Simply add an explicit cast
for the boolean value.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213715 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
compnerd committed Jul 23, 2014
1 parent 3296875 commit 3840ab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,9 @@ ObjectFileMachO::ParseSymtab ()

const size_t function_starts_count = function_starts.GetSize();

const user_id_t TEXT_eh_frame_sectID = eh_frame_section_sp.get() ? eh_frame_section_sp->GetID() : NO_SECT;
const user_id_t TEXT_eh_frame_sectID =
eh_frame_section_sp.get() ? eh_frame_section_sp->GetID()
: static_cast<user_id_t>(NO_SECT);

lldb::offset_t nlist_data_offset = 0;

Expand Down
5 changes: 4 additions & 1 deletion source/Target/Target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,12 @@ Target::CreateFuncRegexBreakpoint (const FileSpecList *containingModules,
bool hardware)
{
SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, containingSourceFiles));
bool skip =
(skip_prologue == eLazyBoolCalculate) ? GetSkipPrologue()
: static_cast<bool>(skip_prologue);
BreakpointResolverSP resolver_sp(new BreakpointResolverName (NULL,
func_regex,
skip_prologue == eLazyBoolCalculate ? GetSkipPrologue() : skip_prologue));
skip));

return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true);
}
Expand Down

0 comments on commit 3840ab6

Please sign in to comment.