Skip to content

Commit 17b0647

Browse files
committed
Wshadow warnings in src/express
1 parent bef8dd9 commit 17b0647

File tree

6 files changed

+142
-148
lines changed

6 files changed

+142
-148
lines changed

src/express/error.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,14 @@ void ERRORset_warning( char * name, int set ) {
184184
ERRORset_all_warnings( !set );
185185
} else {
186186
bool found = false;
187-
LISTdo( ERRORwarnings, opt, Error_Warning )
188-
if( streq( opt->name, name ) ) {
189-
found = true;
190-
LISTdo( opt->errors, err, Error )
191-
err->enabled = set;
192-
LISTod
193-
}
194-
LISTod
187+
LISTdo( ERRORwarnings, opt, Error_Warning ) {
188+
if( streq( opt->name, name ) ) {
189+
found = true;
190+
LISTdo_n( opt->errors, err, Error, b ) {
191+
err->enabled = set;
192+
} LISTod
193+
}
194+
} LISTod
195195
if( found ) {
196196
return;
197197
}
@@ -233,11 +233,11 @@ void ERRORset_warning( char * name, int set ) {
233233
** format fields of the message generated by 'what.'
234234
*/
235235
void ERRORset_all_warnings( int set ) {
236-
LISTdo( ERRORwarnings, opts, Error_Warning )
237-
LISTdo( opts->errors, err, Error )
238-
err->enabled = set;
239-
LISTod
240-
LISTod
236+
LISTdo( ERRORwarnings, opts, Error_Warning ) {
237+
LISTdo_n( opts->errors, err, Error, b ) {
238+
err->enabled = set;
239+
} LISTod
240+
} LISTod
241241
}
242242

243243
void

src/express/expparse.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ entity_decl ::= entity_header subsuper_decl(A) semicolon entity_body(B)
825825
{
826826
CURRENT_SCOPE->u.entity->subtype_expression = A.subtypes;
827827
CURRENT_SCOPE->u.entity->supertype_symbols = A.supertypes;
828-
LISTdo (B.attributes, l, Linked_List) {
829-
LISTdo (l, a, Variable) {
828+
LISTdo( B.attributes, l, Linked_List ) {
829+
LISTdo_n( l, a, Variable, b ) {
830830
ENTITYadd_attribute(CURRENT_SCOPE, a);
831831
} LISTod;
832832
} LISTod;

src/express/expr.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void EXPcleanup( void ) {
249249

250250
/**
251251
* \param selection the Type to look in (i.e. an enum)
252-
* \param ref the Symbol to be found
252+
* \param sref the Symbol to be found
253253
* \param e set to the Expression found, when an enum is found
254254
* \param v set to the Variable found, when a variable is found
255255
* \param dt set to DICT_type when a match is found (use to determine whether to use e or v)
@@ -258,7 +258,7 @@ void EXPcleanup( void ) {
258258
* there will be no ambiguities, since we're looking at (and marking)
259259
* only types, and it's marking only entities
260260
*/
261-
static int EXP_resolve_op_dot_fuzzy( Type selection, Symbol ref, Expression * e,
261+
static int EXP_resolve_op_dot_fuzzy( Type selection, Symbol sref, Expression * e,
262262
Variable * v, char * dt, struct Symbol_ ** where, int s_id ) {
263263
Expression item;
264264
Variable tmp;
@@ -272,7 +272,7 @@ static int EXP_resolve_op_dot_fuzzy( Type selection, Symbol ref, Expression * e,
272272
switch( selection->u.type->body->type ) {
273273
case entity_:
274274
tmp = ENTITYfind_inherited_attribute( selection->u.type->body->entity,
275-
ref.name, &w );
275+
sref.name, &w );
276276
if( tmp ) {
277277
if( w != NULL ) {
278278
*where = w;
@@ -286,7 +286,7 @@ static int EXP_resolve_op_dot_fuzzy( Type selection, Symbol ref, Expression * e,
286286
case select_:
287287
selection->search_id = s_id;
288288
LISTdo( selection->u.type->body->list, t, Type )
289-
if( EXP_resolve_op_dot_fuzzy( t, ref, e, v, dt, &w, s_id ) ) {
289+
if( EXP_resolve_op_dot_fuzzy( t, sref, e, v, dt, &w, s_id ) ) {
290290
if( w != NULL ) {
291291
*where = w;
292292
}
@@ -304,7 +304,7 @@ static int EXP_resolve_op_dot_fuzzy( Type selection, Symbol ref, Expression * e,
304304
return 1;
305305
}
306306
case enumeration_:
307-
item = ( Expression )DICTlookup( TYPEget_enum_tags( selection ), ref.name );
307+
item = ( Expression )DICTlookup( TYPEget_enum_tags( selection ), sref.name );
308308
if( item ) {
309309
*e = item;
310310
*dt = DICT_type;
@@ -482,7 +482,7 @@ Type EXPresolve_op_dot( Expression expr, Scope scope ) {
482482
* there will be no ambiguities, since we're looking at (and marking)
483483
* only types, and it's marking only entities
484484
*/
485-
static int EXP_resolve_op_group_fuzzy( Type selection, Symbol ref, Entity * e,
485+
static int EXP_resolve_op_group_fuzzy( Type selection, Symbol sref, Entity * e,
486486
int s_id ) {
487487
Entity tmp;
488488
int options = 0;
@@ -494,7 +494,7 @@ static int EXP_resolve_op_group_fuzzy( Type selection, Symbol ref, Entity * e,
494494
switch( selection->u.type->body->type ) {
495495
case entity_:
496496
tmp = ( Entity )ENTITYfind_inherited_entity(
497-
selection->u.type->body->entity, ref.name, 1 );
497+
selection->u.type->body->entity, sref.name, 1 );
498498
if( tmp ) {
499499
*e = tmp;
500500
return 1;
@@ -505,7 +505,7 @@ static int EXP_resolve_op_group_fuzzy( Type selection, Symbol ref, Entity * e,
505505
tmp = *e;
506506
selection->search_id = s_id;
507507
LISTdo( selection->u.type->body->list, t, Type )
508-
if( EXP_resolve_op_group_fuzzy( t, ref, e, s_id ) ) {
508+
if( EXP_resolve_op_group_fuzzy( t, sref, e, s_id ) ) {
509509
if( *e != tmp ) {
510510
tmp = *e;
511511
++options;

src/express/generated/expparse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2787,8 +2787,8 @@ static void yy_reduce(
27872787
{
27882788
CURRENT_SCOPE->u.entity->subtype_expression = yymsp[-4].minor.yy242.subtypes;
27892789
CURRENT_SCOPE->u.entity->supertype_symbols = yymsp[-4].minor.yy242.supertypes;
2790-
LISTdo (yymsp[-2].minor.yy176.attributes, l, Linked_List) {
2791-
LISTdo (l, a, Variable) {
2790+
LISTdo( yymsp[-2].minor.yy176.attributes, l, Linked_List ) {
2791+
LISTdo_n( l, a, Variable, b ) {
27922792
ENTITYadd_attribute(CURRENT_SCOPE, a);
27932793
} LISTod;
27942794
} LISTod;

0 commit comments

Comments
 (0)