]> granicus.if.org Git - gc/commitdiff
Eliminate 'possible loss of data' compiler warning in cordprnt (MS VC)
authorIvan Maidanski <ivmai@mail.ru>
Sun, 7 Jul 2019 07:28:09 +0000 (10:28 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 7 Jul 2019 07:28:09 +0000 (10:28 +0300)
* cordprnt.c (CORD_vsprintf): Cast result of ec_len() to short if
long_arg<0.

cord/cordprnt.c

index 0195cce0fa22f3ff24900a5eaee536e5f05df62f..aa745ad935686fea660ee8adc8a0ab57387e5205 100644 (file)
@@ -232,7 +232,7 @@ int CORD_vsprintf(CORD * out, CORD format, va_list args)
                         } else {
                             short * pos_ptr;
                             pos_ptr = va_arg(args, short *);
-                            *pos_ptr = ec_len(result);
+                            *pos_ptr = (short)ec_len(result);
                         }
                         goto done;
                     case 'r':