Skip to content

Commit 1933288

Browse files
committed
Fix [-Wstrict-prototypes] in standard/scanf.c
1 parent 3580150 commit 1933288

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/standard/scanf.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ PHPAPI int php_sscanf_internal( char *string, char *format,
583583
int base = 0;
584584
int underflow = 0;
585585
size_t width;
586-
zend_long (*fn)() = NULL;
586+
zend_long (*fn)(const char*, char**, int) = NULL;
587587
char *ch, sch;
588588
int flags;
589589
char buf[64]; /* Temporary buffer to hold scanned number
@@ -740,29 +740,29 @@ PHPAPI int php_sscanf_internal( char *string, char *format,
740740
case 'D':
741741
op = 'i';
742742
base = 10;
743-
fn = (zend_long (*)())ZEND_STRTOL_PTR;
743+
fn = (zend_long (*)(const char*, char**, int))ZEND_STRTOL_PTR;
744744
break;
745745
case 'i':
746746
op = 'i';
747747
base = 0;
748-
fn = (zend_long (*)())ZEND_STRTOL_PTR;
748+
fn = (zend_long (*)(const char*, char**, int))ZEND_STRTOL_PTR;
749749
break;
750750
case 'o':
751751
op = 'i';
752752
base = 8;
753-
fn = (zend_long (*)())ZEND_STRTOL_PTR;
753+
fn = (zend_long (*)(const char*, char**, int))ZEND_STRTOL_PTR;
754754
break;
755755
case 'x':
756756
case 'X':
757757
op = 'i';
758758
base = 16;
759-
fn = (zend_long (*)())ZEND_STRTOL_PTR;
759+
fn = (zend_long (*)(const char*, char**, int))ZEND_STRTOL_PTR;
760760
break;
761761
case 'u':
762762
op = 'i';
763763
base = 10;
764764
flags |= SCAN_UNSIGNED;
765-
fn = (zend_long (*)())ZEND_STRTOUL_PTR;
765+
fn = (zend_long (*)(const char*, char**, int))ZEND_STRTOUL_PTR;
766766
break;
767767

768768
case 'f':

0 commit comments

Comments
 (0)