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 | 878ca661e63c960b17b8be05a6f7311306ce41dc (patch) | |
tree | be0b6d913fd9cd5008c7f17c6f317aec8847256f /lib/LineEditor/LineEditor.cpp | |
parent | d383b8eec3aac018c0258c9e5d4ad7becf2babc3 (diff) | |
download | llvm-878ca661e63c960b17b8be05a6f7311306ce41dc.tar.gz llvm-878ca661e63c960b17b8be05a6f7311306ce41dc.tar.bz2 llvm-878ca661e63c960b17b8be05a6f7311306ce41dc.tar.xz |
Silence GCC warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LineEditor/LineEditor.cpp')
-rw-r--r-- | lib/LineEditor/LineEditor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/LineEditor/LineEditor.cpp b/lib/LineEditor/LineEditor.cpp index 8b7c12a0fc..80c8080020 100644 --- a/lib/LineEditor/LineEditor.cpp +++ b/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, |