Skip to content

Commit

Permalink
Fix [-Wunused-variable] [-Wparentheses]
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jan 8, 2014
1 parent 75cb392 commit 3a1f02e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions routes/yaf_route_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ zval * yaf_route_map_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query TSRM
efree(pname);

if (IS_ARRAY == Z_TYPE_P(query)) {
uint key_type, key_len, i = 0;
uint key_len, i = 0;
char *key;
ulong key_idx;
zval **tmp_data;
Expand Down Expand Up @@ -277,7 +277,7 @@ PHP_METHOD(yaf_route_map, assemble) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
return;
} else {
if (return_uri = yaf_route_map_assemble(getThis(), mvc, query TSRMLS_CC)) {
if ((return_uri = yaf_route_map_assemble(getThis(), mvc, query TSRMLS_CC))) {
RETURN_ZVAL(return_uri, 0, 1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions routes/yaf_route_regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ zval * yaf_route_regex_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query TS
}

if (IS_ARRAY == Z_TYPE_P(query)) {
uint key_type, key_len;
uint key_len;
char *key;
ulong key_idx;
HashTable *ht = Z_ARRVAL_P(query);
Expand Down Expand Up @@ -364,7 +364,7 @@ PHP_METHOD(yaf_route_regex, assemble) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
return;
} else {
if (return_uri = yaf_route_regex_assemble(getThis(), mvc, query TSRMLS_CC)) {
if ((return_uri = yaf_route_regex_assemble(getThis(), mvc, query TSRMLS_CC))) {
RETURN_ZVAL(return_uri, 0, 1);
}
}
Expand Down
3 changes: 1 addition & 2 deletions routes/yaf_route_rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ PHP_METHOD(yaf_route_rewrite, route) {
/** {{{ zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *query TSRMLS_DC)
*/
zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *query TSRMLS_DC) {
zval *reverse, *uri, *match, *pidents;
zval *uri, *match, *pidents;
zval **tmp;
char *tstr, *inter, *seg, *pmatch, *ptrptr, *key;
int tlen;
Expand Down Expand Up @@ -331,7 +331,6 @@ zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *que
zval_ptr_dtor(&pidents);

if (IS_ARRAY == Z_TYPE_P(query)) {
uint key_type;
HashTable *ht = Z_ARRVAL_P(query);

smart_str_appendc(&squery, '?');
Expand Down
4 changes: 2 additions & 2 deletions routes/yaf_route_supervar.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ zval * yaf_route_supervar_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query
smart_str_appendl(&tvalue, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));

if (IS_ARRAY == Z_TYPE_P(query)) {
uint key_type, key_len;
uint key_len;
char *key;
ulong key_idx;

Expand Down Expand Up @@ -197,7 +197,7 @@ PHP_METHOD(yaf_route_supervar, assemble) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
return;
} else {
if (return_uri = yaf_route_supervar_assemble(getThis(), mvc, query TSRMLS_CC)) {
if ((return_uri = yaf_route_supervar_assemble(getThis(), mvc, query TSRMLS_CC))) {
RETURN_ZVAL(return_uri, 0, 1);
}
}
Expand Down

0 comments on commit 3a1f02e

Please sign in to comment.