File kdelibs-3.5.10-gcc6.patch of Package kdelibs3
Index: kdelibs-3.5.10/kate/part/katebuffer.cpp
===================================================================
--- kdelibs-3.5.10.orig/kate/part/katebuffer.cpp
+++ kdelibs-3.5.10/kate/part/katebuffer.cpp
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <cmath>
#include "katebuffer.h"
#include "katebuffer.moc"
@@ -122,8 +123,8 @@ class KateFileLoader
if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == 0x00))
{
// utf16LE, we need to put the decoder in LE mode
- char reverseUtf16[3] = {0xFF, 0xFE, 0x00};
- m_decoder->toUnicode(reverseUtf16, 2);
+ unsigned char reverseUtf16[3] = {0xFF, 0xFE, 0x00};
+ m_decoder->toUnicode((char *)reverseUtf16, 2);
}
processNull (c);
@@ -917,7 +918,7 @@ void KateBuffer::updatePreviousNotEmptyL
} while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
QMemArray<uint> foldingList=textLine->foldingListArray();
- while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) {
+ while ( (foldingList.size()>0) && ( std::abs((long)foldingList[foldingList.size()-2])==1)) {
foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim);
}
addIndentBasedFoldingInformation(foldingList,addindent,deindent);