Skip to content

Commit 3a1f02e

Browse files
committed
Fix [-Wunused-variable] [-Wparentheses]
1 parent 75cb392 commit 3a1f02e

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

routes/yaf_route_map.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ zval * yaf_route_map_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query TSRM
201201
efree(pname);
202202

203203
if (IS_ARRAY == Z_TYPE_P(query)) {
204-
uint key_type, key_len, i = 0;
204+
uint key_len, i = 0;
205205
char *key;
206206
ulong key_idx;
207207
zval **tmp_data;
@@ -277,7 +277,7 @@ PHP_METHOD(yaf_route_map, assemble) {
277277
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
278278
return;
279279
} else {
280-
if (return_uri = yaf_route_map_assemble(getThis(), mvc, query TSRMLS_CC)) {
280+
if ((return_uri = yaf_route_map_assemble(getThis(), mvc, query TSRMLS_CC))) {
281281
RETURN_ZVAL(return_uri, 0, 1);
282282
}
283283
}

routes/yaf_route_regex.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ zval * yaf_route_regex_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query TS
193193
}
194194

195195
if (IS_ARRAY == Z_TYPE_P(query)) {
196-
uint key_type, key_len;
196+
uint key_len;
197197
char *key;
198198
ulong key_idx;
199199
HashTable *ht = Z_ARRVAL_P(query);
@@ -364,7 +364,7 @@ PHP_METHOD(yaf_route_regex, assemble) {
364364
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
365365
return;
366366
} else {
367-
if (return_uri = yaf_route_regex_assemble(getThis(), mvc, query TSRMLS_CC)) {
367+
if ((return_uri = yaf_route_regex_assemble(getThis(), mvc, query TSRMLS_CC))) {
368368
RETURN_ZVAL(return_uri, 0, 1);
369369
}
370370
}

routes/yaf_route_rewrite.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ PHP_METHOD(yaf_route_rewrite, route) {
270270
/** {{{ zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *query TSRMLS_DC)
271271
*/
272272
zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *query TSRMLS_DC) {
273-
zval *reverse, *uri, *match, *pidents;
273+
zval *uri, *match, *pidents;
274274
zval **tmp;
275275
char *tstr, *inter, *seg, *pmatch, *ptrptr, *key;
276276
int tlen;
@@ -331,7 +331,6 @@ zval * yaf_route_rewrite_assemble(yaf_route_t *this_ptr, zval *idents, zval *que
331331
zval_ptr_dtor(&pidents);
332332

333333
if (IS_ARRAY == Z_TYPE_P(query)) {
334-
uint key_type;
335334
HashTable *ht = Z_ARRVAL_P(query);
336335

337336
smart_str_appendc(&squery, '?');

routes/yaf_route_supervar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ zval * yaf_route_supervar_assemble(yaf_route_t *this_ptr, zval *mvc, zval *query
138138
smart_str_appendl(&tvalue, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
139139

140140
if (IS_ARRAY == Z_TYPE_P(query)) {
141-
uint key_type, key_len;
141+
uint key_len;
142142
char *key;
143143
ulong key_idx;
144144

@@ -197,7 +197,7 @@ PHP_METHOD(yaf_route_supervar, assemble) {
197197
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|a", &mvc, &query) == FAILURE) {
198198
return;
199199
} else {
200-
if (return_uri = yaf_route_supervar_assemble(getThis(), mvc, query TSRMLS_CC)) {
200+
if ((return_uri = yaf_route_supervar_assemble(getThis(), mvc, query TSRMLS_CC))) {
201201
RETURN_ZVAL(return_uri, 0, 1);
202202
}
203203
}

0 commit comments

Comments
 (0)