Skip to content

clang build: unsequenced modifications. #4

@stolk

Description

@stolk

When building with clang:

/home/bram/src/openal-soft/jni/OpenAL/Alc/opensles.c:239:24: warning: multiple unsequenced modifications to 'bufferIndex'
[-Wunsequenced]
bufferIndex = (++bufferIndex) % bufferCount;
~ ^
/home/bram/src/openal-soft/jni/OpenAL/Alc/opensles.c:368:20: warning: multiple unsequenced modifications to 'bufferIndex'
[-Wunsequenced]
bufferIndex = (++bufferIndex) % bufferCount;

A more straightforward:
bufferIndex = ( bufferIndex+1) % bufferCount;
...should be used.

bram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions