Ticket #12762: 0014-encoding.c-fix-gcc6-build.patch

File 0014-encoding.c-fix-gcc6-build.patch, 1.8 KB (added by mt, 8 years ago)
  • src/apps/serialconnect/libvterm/src/encoding.c

    From bdcde9253d45105502a9a6f3ec683893d1cdf565 Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Thu, 5 May 2016 17:02:13 +0900
    Subject: [PATCH 14/24] encoding.c: fix gcc6 build
    
    * Reindent source code, to fix gcc6
      '-Werror=misleading-indentation' warnings.
    ---
     src/apps/serialconnect/libvterm/src/encoding.c | 15 ++++++++++-----
     1 file changed, 10 insertions(+), 5 deletions(-)
    
    diff --git a/src/apps/serialconnect/libvterm/src/encoding.c b/src/apps/serialconnect/libvterm/src/encoding.c
    index 977cb20..7786aa8 100644
    a b static void decode_utf8(VTermEncoding *enc, void *data_,  
    7474        // Check for overlong sequences
    7575        switch(data->bytes_total) {
    7676        case 2:
    77           if(data->this_cp <  0x0080) data->this_cp = UNICODE_INVALID; break;
     77          if(data->this_cp <  0x0080) data->this_cp = UNICODE_INVALID;
     78          break;
    7879        case 3:
    79           if(data->this_cp <  0x0800) data->this_cp = UNICODE_INVALID; break;
     80          if(data->this_cp <  0x0800) data->this_cp = UNICODE_INVALID;
     81          break;
    8082        case 4:
    81           if(data->this_cp < 0x10000) data->this_cp = UNICODE_INVALID; break;
     83          if(data->this_cp < 0x10000) data->this_cp = UNICODE_INVALID;
     84          break;
    8285        case 5:
    83           if(data->this_cp < 0x200000) data->this_cp = UNICODE_INVALID; break;
     86          if(data->this_cp < 0x200000) data->this_cp = UNICODE_INVALID;
     87          break;
    8488        case 6:
    85           if(data->this_cp < 0x4000000) data->this_cp = UNICODE_INVALID; break;
     89          if(data->this_cp < 0x4000000) data->this_cp = UNICODE_INVALID;
     90          break;
    8691        }
    8792        // Now look for plain invalid ones
    8893        if((data->this_cp >= 0xD800 && data->this_cp <= 0xDFFF) ||