Menu

UNREFERENCED_PARAMETER(x); still reported as unreferenced.

Greg Smith
2022-02-07
2022-02-08
  • Greg Smith

    Greg Smith - 2022-02-07

    Yes; I know that it is still unreferenced when code is generated, but the fact that I have gone to the trouble of marking it means that I do NOT want to be told about it any more. This often comes about when handling Windows Messages where one or both of LPARAM/WPARAM is unused and in function overrides. I still want to be told about unreferenced values that I have not marked, so globally disabling the check is the not the answer.

    UNREFERENCED_PARAMETER() is a Windows environment thing, but every platform has an equivalent.

     
  • CHR

    CHR - 2022-02-08

    I have added the macro in this PR: https://github.com/danmar/cppcheck/pull/3809

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.