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

remove const for ScopeGuard operator #156

Open
wants to merge 1 commit into
base: amd-staging
Choose a base branch
from

Commits on Jan 30, 2024

  1. remove const for ScopeGuard operator

    With gcc 14 on Fedora rawhide, there is this build error
    
    [  3%] Building CXX object rocm_smi/CMakeFiles/rocm_smi64.dir/__/src/rocm_smi_device.cc.o
    In file included from rocm_smi_lib/src/rocm_smi_device.cc:67:
    rocm_smi_lib/include/rocm_smi/rocm_smi_utils.h: In member function ‘amd::smi::ScopeGuard<lambda>& amd::smi::ScopeGuard<lambda>::operator=(const amd::smi::ScopeGuard<lambda>&)’:
    /home/trix/rocm/rocm_smi_lib/include/rocm_smi/rocm_smi_utils.h:222:18: error: assignment of member ‘dismiss_’ in read-only object
      222 |     rhs.dismiss_ = true;
          |     ~~~~~~~~~~~~~^~~~~~
    
    The rhs parameter can not be const and setting a sideeffect.
    So remove const
    
    Signed-off-by: Tom Rix <trix@redhat.com>
    Tom Rix committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c5d76ec View commit details
    Browse the repository at this point in the history