Skip to content

Commit

Permalink
prox/opx: Fix build with GCC 15
Browse files Browse the repository at this point in the history
GCC 15 defaults to C23, in which `static_assert` is a keyword (rather than
an alias to `_Static_assert`), and the interpretation of function
declarations without parameters changed from unspecified (as in K&R) to
`void`.

Signed-off-by: Yaakov Selkowitz <[email protected]>
  • Loading branch information
yselkowitz committed Mar 11, 2025
1 parent 8abfb14 commit 43fca14
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions prov/opx/include/fi_opx_tid_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
*/
int opx_tid_cache_setup(struct ofi_mr_cache **cache, struct opx_tid_domain *domain);

int opx_tid_cache_add_abort();
void opx_tid_cache_delete_abort();
int opx_tid_cache_add_abort(struct ofi_mr_cache *, struct ofi_mr_entry *);
void opx_tid_cache_delete_abort(struct ofi_mr_cache *, struct ofi_mr_entry *);

enum opx_tid_cache_entry_status {
OPX_TID_CACHE_ENTRY_NOT_FOUND = 0,
Expand Down
2 changes: 1 addition & 1 deletion prov/opx/include/rdma/opx/fi_opx.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
// Useful for checking that structures are the correct size and other
// compile-time tests. static_assert has existed since C11 so this
// should be safe, but we have an else clause just in case.
#if defined(static_assert)
#if __STDC_VERSION__ >= 201112L
#define OPX_COMPILE_TIME_ASSERT(cond, msg) static_assert(cond, msg)
#else
#define OPX_COMPILE_TIME_ASSERT(cond, msg) \
Expand Down
4 changes: 2 additions & 2 deletions prov/opx/src/fi_opx_tid_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,14 +1787,14 @@ void opx_tid_cache_cleanup(struct ofi_mr_cache *cache)
assert(cache->uncached_size == 0);
}

int opx_tid_cache_add_abort()
int opx_tid_cache_add_abort(struct ofi_mr_cache *, struct ofi_mr_entry *)
{
fprintf(stderr, "%s unexpected function call\n", __func__);
abort();
return 0;
}

void opx_tid_cache_delete_abort()
void opx_tid_cache_delete_abort(struct ofi_mr_cache *, struct ofi_mr_entry *)
{
fprintf(stderr, "%s unexpected function call\n", __func__);
abort();
Expand Down

0 comments on commit 43fca14

Please sign in to comment.