Skip to content

CDRIVER-5673 Fix unused warnings for legacy atomic impls #1704

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

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

kevinAlbs
Copy link
Collaborator

When investigating CXX-3088, building the C++ driver resulted in warnings building the C driver:

../../../mongo-c-driver-src/src/libbson/src/bson/bson-atomic.h: In function 'bson_atomic_int8_fetch':
../../../mongo-c-driver-src/src/libbson/src/bson/bson-atomic.h:203:54: warning: unused parameter 'order' [-Wunused-parameter]
       Type volatile const *a, enum bson_memory_order order)                   \
                                                      ^
../../../mongo-c-driver-src/src/libbson/src/bson/bson-atomic.h:364:1: note: in expansion of macro 'DECL_ATOMIC_INTEGRAL'
 DECL_ATOMIC_INTEGRAL (int8, DECL_ATOMIC_INTEGRAL_INT8, 8)

This PR adds BSON_UNUSED to fix the warning. Fix was verified with this patch build of the C++ driver referring to this branch of the C driver.

@kevinAlbs kevinAlbs changed the title Fix unused warnings for legacy atomic impls CDRIVER-5673 Fix unused warnings for legacy atomic impls Aug 15, 2024
@kevinAlbs kevinAlbs merged commit 50761e8 into mongodb:master Aug 15, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants