Ticket #912 (closed patch: fixed)

Opened 5 years ago

Last modified 5 years ago

remove statement with no effect

Reported by: darbelo Owned by: whiteknight
Priority: normal Milestone:
Component: GC Version: trunk
Severity: low Keywords:
Cc: whiteknight Language:
Patch status: new Platform:

Description

Saw this scroll by the parrot build today: src/gc/api.c: In function `Parrot_gc_destroy_header_pools': src/gc/api.c:1079: warning: statement with no effect

And for one I gree with gcc on this, the attached patch silences the warning by removing the offending line, this causes no visible effect on my box. All tests keep passing, etc.

Attachments

remove-stmt.patch Download (441 bytes) - added by darbelo 5 years ago.

Change History

Changed 5 years ago by darbelo

Changed 5 years ago by jkeenan

  • summary changed from [PATHC] remove statement with no effect. to remove statement with no effect
  • patch set to new

Changed 5 years ago by jkeenan

  • owner set to jkeenan
  • status changed from new to assigned

Changed 5 years ago by jkeenan

  • cc whiteknight added

Changed 5 years ago by jkeenan

make test passes with patch applied on Linux/i386 and Darwin/PPC. On #parrot, cotto indicated he wanted whiteknight to take a look at it in light of r40368. So I did not apply patch to trunk.

kid51

Changed 5 years ago by whiteknight

  • owner changed from jkeenan to whiteknight
  • status changed from assigned to new

That statement does have a purpose, just not in trunk. The new fixed-size allocator that I added in r40368 isn't used by anything in trunk yet. It is being tested and exerised in the auto_attrs branch (and some benchmarks Infinoid took shows that the branch is some 10-15% faster for some benchmarks.

I'll dig through and make sure that this particular line of code is useful, and also find a way to suppress warnings if so.

Changed 5 years ago by whiteknight

  • status changed from new to closed
  • resolution set to fixed

I took another look at this and figured out what the statement was supposed to be doing: setting that pointer to NULL. I fixed it in r40519. Thanks!

Note: See TracTickets for help on using tickets.