File tree 1 file changed +6
-10
lines changed
1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -460,18 +460,14 @@ bool java_bytecode_parsert::parse()
460
460
#define ACC_ANNOTATION 0x2000
461
461
#define ACC_ENUM 0x4000
462
462
463
- #ifdef _MSC_VER
464
- #define UNUSED
465
- #else
466
- #define UNUSED __attribute__ ((unused))
467
- #endif
463
+ #define UNUSED_u2 (x ) { const u2 x = read_u2 (); (void )x; } (void )0
468
464
469
465
void java_bytecode_parsert::rClassFile ()
470
466
{
471
467
parse_tree.loading_successful =false ;
472
468
473
469
u4 magic=read_u4 ();
474
- u2 UNUSED minor_version= read_u2 ( );
470
+ UNUSED_u2 (minor_version );
475
471
u2 major_version=read_u2 ();
476
472
477
473
if (magic!=0xCAFEBABE )
@@ -1180,8 +1176,8 @@ void java_bytecode_parsert::rmethod_attribute(methodt &method)
1180
1176
1181
1177
if (attribute_name==" Code" )
1182
1178
{
1183
- u2 UNUSED max_stack= read_u2 ( );
1184
- u2 UNUSED max_locals= read_u2 ( );
1179
+ UNUSED_u2 (max_stack );
1180
+ UNUSED_u2 (max_locals );
1185
1181
1186
1182
rbytecode (method.instructions );
1187
1183
@@ -1528,8 +1524,8 @@ void java_bytecode_parsert::relement_value_pair(
1528
1524
{
1529
1525
case ' e' :
1530
1526
{
1531
- UNUSED u2 type_name_index= read_u2 ( );
1532
- UNUSED u2 const_name_index= read_u2 ( );
1527
+ UNUSED_u2 (type_name_index );
1528
+ UNUSED_u2 (const_name_index );
1533
1529
// todo: enum
1534
1530
}
1535
1531
break ;
You can’t perform that action at this time.
0 commit comments