This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][Fix] Conditional compilation leaves variables unused
ClosedPublic

Authored by gtbercea on Aug 27 2018, 7:08 AM.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

gtbercea created this revision.Aug 27 2018, 7:08 AM
Hahnfeld requested changes to this revision.Aug 27 2018, 9:41 AM
Hahnfeld added a reviewer: protze.joachim.

The call must not be put into conditional compilation. As discussed in D50774 there are two options:

  1. Guard the variable definition and assignment (the first line) by preprocessor guards.
  2. Add a (void) *_status; to silence the warning.

I think the latter one is used many times in Clang, so I'd favor that.

This revision now requires changes to proceed.Aug 27 2018, 9:41 AM
gtbercea updated this revision to Diff 162714.Aug 27 2018, 11:07 AM
Add implicit cast.
This revision is now accepted and ready to land.Aug 27 2018, 11:14 AM
This revision was automatically updated to reflect the committed changes.