summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host
diff options
context:
space:
mode:
authorVince Harron <vince@nethacker.com>2015-05-13 00:25:54 +0000
committerVince Harron <vince@nethacker.com>2015-05-13 00:25:54 +0000
commitd7e6a4f2f07464acfe4fe98b4e4038c67c7b2975 (patch)
tree329d2a720739a7140401e3842b751aa7f0651c93 /lldb/source/Host
parent9bbc3653c5ccb170167b2ab3c4ec098be83a3d04 (diff)
downloadbcm5719-llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.tar.gz
bcm5719-llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.zip
Fixed a ton of gcc compile warnings
Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
Diffstat (limited to 'lldb/source/Host')
-rw-r--r--lldb/source/Host/common/Editline.cpp8
-rw-r--r--lldb/source/Host/common/Symbols.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp
index dd2e2dbf5fc..3d0d4d3dfb8 100644
--- a/lldb/source/Host/common/Editline.cpp
+++ b/lldb/source/Host/common/Editline.cpp
@@ -711,7 +711,7 @@ Editline::BreakLineCommand (int ch)
unsigned char
Editline::DeleteNextCharCommand (int ch)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
// Just delete the next character normally if possible
if (info->cursor < info->lastchar)
@@ -755,7 +755,7 @@ Editline::DeleteNextCharCommand (int ch)
unsigned char
Editline::DeletePreviousCharCommand (int ch)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
// Just delete the previous character normally when not at the start of a line
if (info->cursor > info->buffer)
@@ -861,7 +861,7 @@ Editline::FixIndentationCommand (int ch)
StringList lines = GetInputAsStringList (m_current_line_index + 1);
// Determine the cursor position
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
int cursor_position = info->cursor - info->buffer;
int indent_correction = m_fix_indentation_callback (this, lines, cursor_position, m_fix_indentation_callback_baton);
@@ -887,7 +887,7 @@ Editline::RevertLineCommand (int ch)
el_winsertstr (m_editline, m_input_lines[m_current_line_index].c_str());
if (m_revert_cursor_index >= 0)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
info->cursor = info->buffer + m_revert_cursor_index;
if (info->cursor > info->lastchar)
{
diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp
index d71a122aafd..1ed7cfd87d7 100644
--- a/lldb/source/Host/common/Symbols.cpp
+++ b/lldb/source/Host/common/Symbols.cpp
@@ -136,7 +136,7 @@ LocateExecutableSymbolFileDsym (const ModuleSpec &module_spec)
"LocateExecutableSymbolFileDsym (file = %s, arch = %s, uuid = %p)",
exec_fspec ? exec_fspec->GetFilename().AsCString ("<NULL>") : "<NULL>",
arch ? arch->GetArchitectureName() : "<NULL>",
- uuid);
+ (void*)uuid);
FileSpec symbol_fspec;
// First try and find the dSYM in the same directory as the executable or in
@@ -159,7 +159,7 @@ Symbols::LocateExecutableObjectFile (const ModuleSpec &module_spec)
"LocateExecutableObjectFile (file = %s, arch = %s, uuid = %p)",
exec_fspec ? exec_fspec->GetFilename().AsCString ("<NULL>") : "<NULL>",
arch ? arch->GetArchitectureName() : "<NULL>",
- uuid);
+ (void*)uuid);
FileSpec objfile_fspec;
ModuleSpecList module_specs;
OpenPOWER on IntegriCloud