Project

General

Profile

Bug #1527

Unused Parameter Warning in Entry Methods with no Parameters

Added by Nils Deppe about 2 years ago. Updated about 2 years ago.

Status:
Merged
Priority:
High
Assignee:
Category:
Charmxi
Target version:
Start date:
04/23/2017
Due date:
% Done:

0%

Spent time:

Description

In v6.8.0-beta2 entry methods that do not have any parameters emit an unused parameter warning for impl_e_opts. These functions used to not take any parameters in v6.7.1. Assuming this behavior is correct this could easily be silenced with a static_cast<void>(impl_e_opts) in the function body.

As a concrete example:

void CProxy_EvolveSystem::exit(const CkEntryOptions *impl_e_opts)
{
  ckCheck();
  void *impl_msg = CkAllocSysMsg();
  if (ckIsDelegated()) {
    int destPE=CkChareMsgPrep(CkIndex_EvolveSystem::idx_exit_void(), impl_msg, &ckGetChareID());
    if (destPE!=-1) ckDelegatedTo()->ChareSend(ckDelegatedPtr(),CkIndex_EvolveSystem::idx_exit_void(), impl_msg, &ckGetChareID(),destPE);
  } else {
    CkSendMsg(CkIndex_EvolveSystem::idx_exit_void(), impl_msg, &ckGetChareID(),0);
  }
}

adding the static_cast on line 3 avoids the warning.

History

#1 Updated by Sam White about 2 years ago

  • Assignee set to Nitin Bhat
  • Category set to Charmxi

It used to be that we didn't actually support CkEntryOptions on entry methods taking no arguments, but we recently added support for that. Should be easy enough to add the cast to void.

#2 Updated by Nils Deppe about 2 years ago

Ah okay, that explains it. I haven't used entry options (yet) so I wasn't able to provide more info. Thanks for looking at this so quickly!

#3 Updated by Phil Miller about 2 years ago

  • Priority changed from Normal to High

#4 Updated by Nitin Bhat about 2 years ago

  • Status changed from New to Implemented

Fix: https://charm.cs.illinois.edu/gerrit/#/c/2436/1

This patch only targets removing warnings for entry methods that take no arguments. We could potentially have warnings removed for other generated code too. (Probably in a later patch, targeting a later release).

#5 Updated by Sam White about 2 years ago

  • Status changed from Implemented to Merged

Also available in: Atom PDF