Skip to content

Commit 25cb8df

Browse files
committed
Silence compiler warnings
1 parent bb21617 commit 25cb8df

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5564,16 +5564,14 @@ PHP_FUNCTION(mb_str_pad)
55645564
size_t num_mb_pad_chars = pad_to_length - input_length;
55655565

55665566
/* We need to figure out the left/right padding lengths. */
5567-
size_t left_pad, right_pad;
5567+
size_t left_pad = 0, right_pad = 0; /* Initialize here to silence compiler warnings. */
55685568
switch (pad_type_val) {
55695569
case PHP_STR_PAD_RIGHT:
5570-
left_pad = 0;
55715570
right_pad = num_mb_pad_chars;
55725571
break;
55735572

55745573
case PHP_STR_PAD_LEFT:
55755574
left_pad = num_mb_pad_chars;
5576-
right_pad = 0;
55775575
break;
55785576

55795577
case PHP_STR_PAD_BOTH:

0 commit comments

Comments
 (0)