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

Fix error: comparison of unsigned expression < 0 is always false #7455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 9, 2024

  1. Fix error: comparison of unsigned expression < 0 is always false

    omrthread_prio_t is of type uintptr_t. It cannot have a value below 0.
    
    J9THREAD_PRIORITY_MIN is defined as 0 and J9THREAD_PRIORITY_MAX is
    defined as 11.
    
    In omrthread_attr_set_priority, priority, which is of type
    omrthread_prio_t, will always be greater than or equal to
    J9THREAD_PRIORITY_MIN. To see if priority is invalid, we only need
    to evaluate if it is greater than J9THREAD_PRIORITY_MAX.
    
    Fixes: eclipse#7454
    
    Signed-off-by: Babneet Singh <[email protected]>
    babsingh committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    9cd09f6 View commit details
    Browse the repository at this point in the history