diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-01 11:26:18 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-01 11:26:18 +0000 |
commit | 029750fb95118d660e3d7156cde21eedb379e290 (patch) | |
tree | 94a62a0c4dfd011997f3392ba42797ef42775c65 /llvm/lib/LineEditor/LineEditor.cpp | |
parent | 6b4cc8b66a2e7a07cc4d1064200c245597743b88 (diff) | |
download | bcm5719-llvm-029750fb95118d660e3d7156cde21eedb379e290.tar.gz bcm5719-llvm-029750fb95118d660e3d7156cde21eedb379e290.zip |
Silence GCC warnings.
llvm-svn: 200610
Diffstat (limited to 'llvm/lib/LineEditor/LineEditor.cpp')
-rw-r--r-- | llvm/lib/LineEditor/LineEditor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/LineEditor/LineEditor.cpp b/llvm/lib/LineEditor/LineEditor.cpp index 8b7c12a0fcf..80c80800202 100644 --- a/llvm/lib/LineEditor/LineEditor.cpp +++ b/llvm/lib/LineEditor/LineEditor.cpp @@ -131,7 +131,7 @@ static unsigned char ElCompletionFn(EditLine *EL, int ch) { // Push a sequence of Ctrl-B characters to move the cursor back to its // original position. std::string Prevs(Data->PrevCount, '\02'); - ::el_push(EL, (char *)Prevs.c_str()); + ::el_push(EL, const_cast<char *>(Prevs.c_str())); Data->ContinuationOutput.clear(); @@ -158,7 +158,7 @@ static unsigned char ElCompletionFn(EditLine *EL, int ch) { // from here to cause libedit to move the cursor immediately. This will // break horribly if the user has rebound their keys, so for now we do // not permit user rebinding. - ::el_push(EL, (char *)"\05\t"); + ::el_push(EL, const_cast<char *>("\05\t")); // This assembles the output for the continuation block above. raw_string_ostream OS(Data->ContinuationOutput); @@ -186,9 +186,8 @@ static unsigned char ElCompletionFn(EditLine *EL, int ch) { return CC_REFRESH; } } - } else { - return CC_ERROR; } + return CC_ERROR; } LineEditor::LineEditor(StringRef ProgName, StringRef HistoryPath, FILE *In, |