]> granicus.if.org Git - php/commitdiff
Fix unused value warnings in snprintf.c
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Jun 2019 11:02:56 +0000 (13:02 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 12 Jun 2019 11:17:25 +0000 (13:17 +0200)
main/snprintf.c

index e3e0993ab5a910eaa3635ce7fb7ba6ca2fa81a90..61a5dfffce42f8fdf2d18d7266162e43673784e5 100644 (file)
@@ -568,7 +568,7 @@ typedef struct buf_area buffy;
            INS_CHAR( ch, sp, bep, cc ) ;       \
            width-- ;                           \
        }                                       \
-       while ( width > len )
+       while ( (size_t)width > len )
 
 /*
  * Prefix the character ch to the string str
@@ -1188,7 +1188,7 @@ fmt_error:
                                        s_len--;
                                        min_width--;
                                }
-                               PAD((size_t)min_width, s_len, pad_char);
+                               PAD(min_width, s_len, pad_char);
                        }
                        /*
                         * Print the string s.
@@ -1199,7 +1199,7 @@ fmt_error:
                        }
 
                        if (adjust_width && adjust == LEFT && (size_t)min_width > s_len)
-                               PAD((size_t)min_width, s_len, pad_char);
+                               PAD(min_width, s_len, pad_char);
                        if (free_zcopy) {
                                zval_ptr_dtor_str(&zcopy);
                        }