Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OpenCDMi] Remove all unnecessary member variables to save some memory #329

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

VeithMetro
Copy link
Contributor

@VeithMetro VeithMetro commented Nov 20, 2024

@HaseenaSainul discovered that the VARIABLE_IS_NOT_USED leads to the build error with buildroot:

FrameworkRPC.cpp:383:69: error: ‘unused’ attribute ignored [-Werror=attributes]
  383 |                     VARIABLE_IS_NOT_USED CDMi::IMediaKeySessionExt* _mediaKeysExt;
      |                                                                     ^~~~~~~~~~~~~
FrameworkRPC.cpp:384:51: error: ‘unused’ attribute ignored [-Werror=attributes]
  384 |                     VARIABLE_IS_NOT_USED uint8_t* _sessionKey;
      |                                                   ^~~~~~~~~~~
FrameworkRPC.cpp:385:51: error: ‘unused’ attribute ignored [-Werror=attributes]
  385 |                     VARIABLE_IS_NOT_USED uint32_t _sessionKeyLength;
      |                                                   ^~~~~~~~~~~~~~~~~
FrameworkRPC.cpp:756:55: error: ‘unused’ attribute ignored [-Werror=attributes]
  756 |                 VARIABLE_IS_NOT_USED mutable uint32_t _refCount;

So let's just removed the unused member variables and save some memory

Copy link
Contributor

@HaseenaSainul HaseenaSainul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VeithMetro VeithMetro changed the title [OpenCDMi] Use the warning suppression instead of the variable is not used macro [OpenCDMi] Remove all unnecessary member variables to save some memory Nov 21, 2024
@VeithMetro VeithMetro requested a review from sebaszm November 21, 2024 11:02
@VeithMetro VeithMetro merged commit 6d71457 into master Nov 21, 2024
40 checks passed
@VeithMetro VeithMetro deleted the opencdm-compilation-error branch November 21, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants