Browse Source

Fix FTBFS with GCC6

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 2 years ago
parent
commit
0d8345e6f7
5 changed files with 11 additions and 9 deletions
  1. 2
    2
      kate/part/katebuffer.cpp
  2. 3
    1
      kjs/create_hash_table
  3. 1
    1
      tdehtml/misc/decoder.cpp
  4. 1
    1
      tdersync/tdersync.cpp
  5. 4
    4
      tdeui/kdialogbase.cpp

+ 2
- 2
kate/part/katebuffer.cpp View File

@@ -122,7 +122,7 @@ class KateFileLoader
122 122
           if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == 0x00))
123 123
           {
124 124
             // utf16LE, we need to put the decoder in LE mode
125
-            char reverseUtf16[3] = {0xFF, 0xFE, 0x00};
125
+            char reverseUtf16[3] = {'\xFF', '\xFE', '\x00'};
126 126
             m_decoder->toUnicode(reverseUtf16, 2);
127 127
           }
128 128
 
@@ -917,7 +917,7 @@ void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,
917 917
   } while (textLine->firstChar()==-1);
918 918
   kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
919 919
   TQMemArray<uint> foldingList=textLine->foldingListArray();
920
-  while ( (foldingList.size()>0)  && ( abs(foldingList[foldingList.size()-2])==1)) {
920
+  while ( (foldingList.size()>0)  && ( labs(foldingList[foldingList.size()-2])==1)) {
921 921
     foldingList.resize(foldingList.size()-2,TQGArray::SpeedOptim);
922 922
   }
923 923
   addIndentBasedFoldingInformation(foldingList,addindent,deindent);

+ 3
- 1
kjs/create_hash_table View File

@@ -69,7 +69,9 @@ while (<IN>) {
69 69
       my $att = $3;
70 70
       my $param = $4;
71 71
       push(@keys, $key);
72
-      push(@values, $val);
72
+      # values in HashEntry are short but can be unsigned in C++ code
73
+      # therefore it is necessary to force the cast in the generated files
74
+      push(@values, "(short)".$val);
73 75
       printf STDERR "WARNING: Number of arguments missing for $key/$val\n"
74 76
         if ( $att =~ m/Function/ && length($param) == 0);
75 77
       push(@attrs, length($att) > 0 ? $att : "0");

+ 1
- 1
tdehtml/misc/decoder.cpp View File

@@ -265,7 +265,7 @@ TQString Decoder::decode(const char *data, int len)
265 265
                 if (m_codec->mibEnum() == 1000 && c2 == 0x00)
266 266
                 {
267 267
                   // utf16LE, we need to put the decoder in LE mode
268
-                  char reverseUtf16[3] = {0xFF, 0xFE, 0x00};
268
+                  char reverseUtf16[3] = {'\xFF', '\xFE', '\x00'};
269 269
                   m_decoder->toUnicode(reverseUtf16, 2);
270 270
                 }
271 271
             }

+ 1
- 1
tdersync/tdersync.cpp View File

@@ -61,7 +61,7 @@
61 61
 #define CONFIGURATION_FILE_SEPARATOR ';'
62 62
 
63 63
 KDE_EXPORT KRsync::KRsync (TQObject* parent, const char* name)
64
-                : TQObject (parent, name), m_progressDialog(false), m_progressDialogExists(false), m_bSettingsLoaded(false), m_bInSpecialSync(false)
64
+                : TQObject (parent, name), m_progressDialog(0), m_progressDialogExists(false), m_bSettingsLoaded(false), m_bInSpecialSync(false)
65 65
 {
66 66
     loadSettings();
67 67
 

+ 4
- 4
tdeui/kdialogbase.cpp View File

@@ -671,11 +671,11 @@ void KDialogBase::setButtonStyle( int style )
671 671
   if( style < 0 || style >= ActionStyleMAX ) { style = ActionStyle0; }
672 672
   d->mButton.style = style;
673 673
 
674
-  const int *layout;
674
+  const unsigned int *layout;
675 675
   int layoutMax = 0;
676 676
   if (mMessageBoxMode)
677 677
   {
678
-    static const int layoutRule[5][6] =
678
+    static const unsigned int layoutRule[5][6] =
679 679
     {
680 680
       {Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler},
681 681
       {Details,Stretch,User2|Stretch,User1|Stretch,Cancel|Stretch, Details|Filler},
@@ -688,7 +688,7 @@ void KDialogBase::setButtonStyle( int style )
688 688
   }
689 689
   else if (mButtonOrientation == Qt::Horizontal)
690 690
   {
691
-    static const int layoutRule[5][10] =
691
+    static const unsigned int layoutRule[5][10] =
692 692
     {
693 693
       {Details,Help,Default,Stretch,User3,User2,User1,Ok,Apply|Try,Cancel|Close},
694 694
       {Details,Help,Default,Stretch,User3,User2,User1,Cancel|Close,Apply|Try,Ok},
@@ -701,7 +701,7 @@ void KDialogBase::setButtonStyle( int style )
701 701
   }
702 702
   else
703 703
   {
704
-    static const int layoutRule[5][10] =
704
+    static const unsigned int layoutRule[5][10] =
705 705
     {
706 706
       {Ok,Apply|Try,User1,User2,User3,Stretch,Default,Cancel|Close,Help, Details},
707 707
       //{Ok,Apply|Try,Cancel|Close,User1,User2,User3,Stretch, Default,Help, Details},

Loading…
Cancel
Save