Patch 8.2.0106
Problem:    Printf formats are not exactly right.
Solution:   Adjust signed/unsigned conversions. (Frazer Clews, closes #5456)
Files:      runtime/tools/ccfilter.c, src/libvterm/src/parser.c,
            src/libvterm/src/pen.c, src/ui.c


*** ../vim-8.2.0105/runtime/tools/ccfilter.c    2016-05-10 07:51:08.000000000 
+0200
--- runtime/tools/ccfilter.c    2020-01-08 22:00:08.291198885 +0100
***************
*** 184,190 ****
          case COMPILER_GCC:
            Severity = 'e';
  #ifdef GOTO_FROM_WHERE_INCLUDED
!           rv = sscanf( Line, "In file included from %[^:]:%u:",
                               FileName, &Row );
            if ( rv == 2 )
              {
--- 184,190 ----
          case COMPILER_GCC:
            Severity = 'e';
  #ifdef GOTO_FROM_WHERE_INCLUDED
!           rv = sscanf( Line, "In file included from %[^:]:%lu:",
                               FileName, &Row );
            if ( rv == 2 )
              {
***************
*** 193,203 ****
            else
  #endif
              {
!               if ((rv = sscanf( Line, "%[^:]:%u: warning: %[^\n]",
                                   FileName, &Row, Reason ))==3) {
                 Severity = 'w';
                } else {
!               rv = sscanf( Line, "%[^:]:%u: %[^\n]",
                                   FileName, &Row, Reason );
                }
                ok = ( rv == 3 );
--- 193,203 ----
            else
  #endif
              {
!               if ((rv = sscanf( Line, "%[^:]:%lu: warning: %[^\n]",
                                   FileName, &Row, Reason ))==3) {
                 Severity = 'w';
                } else {
!               rv = sscanf( Line, "%[^:]:%lu: %[^\n]",
                                   FileName, &Row, Reason );
                }
                ok = ( rv == 3 );
***************
*** 205,228 ****
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_AIX:
!           rv = sscanf( Line, "\"%[^\"]\", line %u.%u: %*s (%c) %[^\n]",
                               FileName, &Row, &Col, &Severity, Reason );
            ok = ( rv == 5 );
            break;
          case COMPILER_HPUX:
!           rv = sscanf( Line, "cc: \"%[^\"]\", line %u: %c%*[^:]: %[^\n]",
                               FileName, &Row, &Severity, Reason );
            ok = ( rv == 4 );
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_SOLARIS:
!           rv = sscanf( Line, "\"%[^\"]\", line %u: warning: %[^\n]",
                               FileName, &Row, Reason );
            Severity = 'w';
            ok = ( rv == 3 );
            if ( rv != 3 )
              {
!               rv = sscanf( Line, "\"%[^\"]\", line %u: %[^\n]",
                                   FileName, &Row, Reason );
                Severity = 'e';
                ok = ( rv == 3 );
--- 205,228 ----
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_AIX:
!           rv = sscanf( Line, "\"%[^\"]\", line %lu.%lu: %*s (%c) %[^\n]",
                               FileName, &Row, &Col, &Severity, Reason );
            ok = ( rv == 5 );
            break;
          case COMPILER_HPUX:
!           rv = sscanf( Line, "cc: \"%[^\"]\", line %lu: %c%*[^:]: %[^\n]",
                               FileName, &Row, &Severity, Reason );
            ok = ( rv == 4 );
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_SOLARIS:
!           rv = sscanf( Line, "\"%[^\"]\", line %lu: warning: %[^\n]",
                               FileName, &Row, Reason );
            Severity = 'w';
            ok = ( rv == 3 );
            if ( rv != 3 )
              {
!               rv = sscanf( Line, "\"%[^\"]\", line %lu: %[^\n]",
                                   FileName, &Row, Reason );
                Severity = 'e';
                ok = ( rv == 3 );
***************
*** 230,247 ****
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_ATT:
!           rv   = sscanf( Line, "%c \"%[^\"]\",L%u/C%u%*[^:]:%[^\n]",
                                 &Severity, FileName, &Row, &Col, Reason );
            ok = ( rv == 5 );
  
            if (rv != 5)
!             { rv   = sscanf( Line, "%c \"%[^\"]\",L%u/C%u: %[^\n]",
                                     &Severity, FileName, &Row, &Col, Reason );
                ok = ( rv == 5 );
              }
  
            if (rv != 5)
!             { rv  = sscanf( Line, "%c \"%[^\"]\",L%u: %[^\n]",
                                   &Severity, FileName, &Row, Reason );
                ok = ( rv == 4 );
                Col = (dec_col ? 1 : 0 );
--- 230,247 ----
            Col = (dec_col ? 1 : 0 );
            break;
          case COMPILER_ATT:
!           rv   = sscanf( Line, "%c \"%[^\"]\",L%lu/C%lu%*[^:]:%[^\n]",
                                 &Severity, FileName, &Row, &Col, Reason );
            ok = ( rv == 5 );
  
            if (rv != 5)
!             { rv   = sscanf( Line, "%c \"%[^\"]\",L%lu/C%lu: %[^\n]",
                                     &Severity, FileName, &Row, &Col, Reason );
                ok = ( rv == 5 );
              }
  
            if (rv != 5)
!             { rv  = sscanf( Line, "%c \"%[^\"]\",L%lu: %[^\n]",
                                   &Severity, FileName, &Row, Reason );
                ok = ( rv == 4 );
                Col = (dec_col ? 1 : 0 );
***************
*** 272,281 ****
                  }
                 else
                  {
!                   rv = sscanf( p+2, "%[^:]: %u: %[^\n]",
                                 FileName, &Row, Reason );
                    if (rv != 3)
!                     rv = sscanf( p+2, "%[^,], line %u: %[^\n]",
                                   FileName, &Row, Reason );
                    ok = ( rv == 3 );
                  }
--- 272,281 ----
                  }
                 else
                  {
!                   rv = sscanf( p+2, "%[^:]: %lu: %[^\n]",
                                 FileName, &Row, Reason );
                    if (rv != 3)
!                     rv = sscanf( p+2, "%[^,], line %lu: %[^\n]",
                                   FileName, &Row, Reason );
                    ok = ( rv == 3 );
                  }
***************
*** 315,324 ****
        {
          for (p=Reason; (*p) && (isspace(*p)); p++);
          if ( BasePath[CWDlen] == 0 )
!             printf( "%s:%u:%u:%c:%s\n", FileName, Row, Col, Severity, p );
          else
            {
!             printf( "%s/%s:%u:%u:%c:%s\n", &BasePath[CWDlen+1], FileName, 
Row, Col, Severity, p );
            }
        }
        if (!prefetch)
--- 315,324 ----
        {
          for (p=Reason; (*p) && (isspace(*p)); p++);
          if ( BasePath[CWDlen] == 0 )
!             printf( "%s:%lu:%lu:%c:%s\n", FileName, Row, Col, Severity, p );
          else
            {
!             printf( "%s/%s:%lu:%lu:%c:%s\n", &BasePath[CWDlen+1], FileName, 
Row, Col, Severity, p );
            }
        }
        if (!prefetch)
*** ../vim-8.2.0105/src/libvterm/src/parser.c   2019-09-13 22:24:15.000000000 
+0200
--- src/libvterm/src/parser.c   2020-01-08 22:00:08.291198885 +0100
***************
*** 65,71 ****
  {
    if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) {
      len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur;
!     DEBUG_LOG1("Truncating strbuffer preserve to %zd bytes\n", len);
    }
  
    if(len > 0) {
--- 65,71 ----
  {
    if(len > vt->parser.strbuffer_len - vt->parser.strbuffer_cur) {
      len = vt->parser.strbuffer_len - vt->parser.strbuffer_cur;
!     DEBUG_LOG1("Truncating strbuffer preserve to %zu bytes\n", len);
    }
  
    if(len > 0) {
*** ../vim-8.2.0105/src/libvterm/src/pen.c      2019-08-18 20:58:44.000000000 
+0200
--- src/libvterm/src/pen.c      2020-01-08 22:00:08.291198885 +0100
***************
*** 387,393 ****
  
      if (!done)
      {
!       DEBUG_LOG1("libvterm: Unhandled CSI SGR %lu\n", arg);
      }
  
      while (CSI_ARG_HAS_MORE(args[argi++]))
--- 387,393 ----
  
      if (!done)
      {
!       DEBUG_LOG1("libvterm: Unhandled CSI SGR %ld\n", arg);
      }
  
      while (CSI_ARG_HAS_MORE(args[argi++]))
*** ../vim-8.2.0105/src/ui.c    2019-12-15 12:54:14.464144568 +0100
--- src/ui.c    2020-01-08 22:00:08.291198885 +0100
***************
*** 1168,1174 ****
      cb->prev = cb->start;
  
  #ifdef DEBUG_SELECTION
!     printf("Selection started at (%u,%u)\n", cb->start.lnum, cb->start.col);
  #endif
  }
  
--- 1168,1174 ----
      cb->prev = cb->start;
  
  #ifdef DEBUG_SELECTION
!     printf("Selection started at (%ld,%d)\n", cb->start.lnum, cb->start.col);
  #endif
  }
  
***************
*** 1203,1209 ****
        }
  
  #ifdef DEBUG_SELECTION
!       printf("Selection ended: (%u,%u) to (%u,%u)\n", cb->start.lnum,
                cb->start.col, cb->end.lnum, cb->end.col);
  #endif
        if (clip_isautosel_star()
--- 1203,1209 ----
        }
  
  #ifdef DEBUG_SELECTION
!       printf("Selection ended: (%ld,%d) to (%ld,%d)\n", cb->start.lnum,
                cb->start.col, cb->end.lnum, cb->end.col);
  #endif
        if (clip_isautosel_star()
***************
*** 1347,1353 ****
      cb->prev.col  = col;
  
  #ifdef DEBUG_SELECTION
!       printf("Selection is: (%u,%u) to (%u,%u)\n", cb->start.lnum,
                cb->start.col, cb->end.lnum, cb->end.col);
  #endif
  }
--- 1347,1353 ----
      cb->prev.col  = col;
  
  #ifdef DEBUG_SELECTION
!       printf("Selection is: (%ld,%d) to (%ld,%d)\n", cb->start.lnum,
                cb->start.col, cb->end.lnum, cb->end.col);
  #endif
  }
*** ../vim-8.2.0105/src/version.c       2020-01-08 21:42:41.947057539 +0100
--- src/version.c       2020-01-08 22:04:45.122177517 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     106,
  /**/

-- 
What do you get when you cross a joke with a rehtorical question?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202001082106.008L6ex5015694%40masaka.moolenaar.net.

Raspunde prin e-mail lui