@@ -44,10 +44,8 @@ static void php_git2_config_free_storage(php_git2_config *object TSRMLS_DC)
4444static int php_git2_config_has_dimension (zval * object , zval * member , int check_empty TSRMLS_DC )
4545{
4646 zend_object_handlers * standard ;
47- HashTable * hash ;
48- zval * entry , * tmp_result , * * target_offset ;
47+ zval * entry , * * target_offset ;
4948 char * current_key , * tmp_value , * savedptr , * k ;
50- int error = 0 ;
5149
5250 entry = zend_read_property (git2_config_class_entry , object ,"configs" ,sizeof ("configs" )- 1 , 0 TSRMLS_CC );
5351
@@ -92,8 +90,6 @@ static int php_git2_config_has_dimension(zval *object, zval *member, int check_e
9290/* @todo refactoring */
9391static zval * php_git2_config_read_dimension (zval * object , zval * offset , int type TSRMLS_DC )
9492{
95- zend_object_handlers * standard ;
96- HashTable * hash ;
9793 zval * entry , * tmp_result , * * target_offset ;
9894 char * current_key , * tmp_value , * savedptr , * k ;
9995 int error = 0 ;
@@ -172,7 +168,6 @@ typedef struct{
172168static int php_git2_config_resolve (zval * * result , const char * var_name , zval * m_config )
173169{
174170 TSRMLS_FETCH ();
175- HashTable * hash ;
176171 zval * entry , * tmp_result , * * target_offset ;
177172 char * current_key , * tmp_value , * savedptr , * k ;
178173 int error = 0 ;
@@ -289,8 +284,7 @@ static int php_git2_config_reload(zval *object, unsigned short dtor TSRMLS_DC)
289284static void php_git2_config_write_dimension (zval * object , zval * offset , zval * value TSRMLS_DC )
290285{
291286 char * key ;
292- int error , key_len = 0 ;
293- zval * result , * entry ;
287+ int error = 0 ;
294288 php_git2_config * m_config ;
295289
296290 m_config = PHP_GIT2_GET_OBJECT (php_git2_config , object );
@@ -325,8 +319,6 @@ PHP_METHOD(git2_config, __construct)
325319 git_config * config ;
326320 int error , path_len = 0 ;
327321 php_git2_config * m_config ;
328- zval * config_array ;
329- php_git2_config_foreach_t payload ;
330322
331323 /* @todo: supports array for reading multiple configs */
332324 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
@@ -354,10 +346,7 @@ PHP_METHOD(git2_config, __construct)
354346PHP_METHOD (git2_config , get )
355347{
356348 char * key ;
357- git_config * config ;
358- int error , key_len = 0 ;
359- const char * value ;
360- php_git2_config * m_config ;
349+ int key_len = 0 ;
361350 zval * result ;
362351
363352 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
@@ -382,9 +371,8 @@ PHP_METHOD(git2_config, store)
382371{
383372 char * key ;
384373 int error , key_len = 0 ;
385- zval * result , * value , * entry ;
374+ zval * value ;
386375 php_git2_config * m_config ;
387- php_git2_config_foreach_t payload ;
388376
389377 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
390378 "sz" , & key , & key_len , & value ) == FAILURE ) {
@@ -424,10 +412,8 @@ PHP_METHOD(git2_config, store)
424412PHP_METHOD (git2_config , delete )
425413{
426414 char * key ;
427- int error , key_len = 0 ;
428- zval * result , * entry ;
415+ int key_len = 0 ;
429416 php_git2_config * m_config ;
430- php_git2_config_foreach_t payload ;
431417
432418 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
433419 "s" , & key , & key_len ) == FAILURE ) {
0 commit comments