From bbc392e4543dc5d1aa47e611ba1845799476cae2 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Thu, 9 Nov 2023 23:29:30 +0900 Subject: [PATCH] fix: fix -Wvla-parameter --- src/context.h | 2 +- src/msym.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context.h b/src/context.h index d967883..94182a4 100644 --- a/src/context.h +++ b/src/context.h @@ -26,7 +26,7 @@ msym_error_t ctxGetThresholds(msym_context ctx, msym_thresholds_t **thresholds); -msym_error_t ctxSetElements(msym_context ctx, int length, msym_element_t *elements); +msym_error_t ctxSetElements(msym_context ctx, int length, msym_element_t elements[length]); msym_error_t ctxGetElements(msym_context, int *l, msym_element_t **elements); msym_error_t ctxGetExternalElements(msym_context ctx, int *l, msym_element_t **elements); msym_error_t ctxUpdateExternalElementCoordinates(msym_context ctx); diff --git a/src/msym.h b/src/msym.h index 78ad491..14d4ab1 100644 --- a/src/msym.h +++ b/src/msym.h @@ -175,7 +175,7 @@ extern "C" { msym_error_t MSYM_EXPORT msymGetPointGroupType(msym_context ctx, msym_point_group_type_t *t, int *n); msym_error_t MSYM_EXPORT msymSetPointGroupByName(msym_context ctx, const char *name); msym_error_t MSYM_EXPORT msymSetPointGroupByType(msym_context ctx, msym_point_group_type_t type, int n); - msym_error_t MSYM_EXPORT msymGetPointGroupName(msym_context ctx, int l, char *buf); + msym_error_t MSYM_EXPORT msymGetPointGroupName(msym_context ctx, int l, char buf[l]); msym_error_t MSYM_EXPORT msymGetSubgroups(msym_context ctx, int *l, const msym_subgroup_t **subgroups); msym_error_t MSYM_EXPORT msymSelectSubgroup(msym_context ctx, const msym_subgroup_t *subgroup); msym_error_t MSYM_EXPORT msymGetSymmetryOperations(msym_context ctx, int *sopsl, const msym_symmetry_operation_t **sops); @@ -198,7 +198,7 @@ extern "C" { msym_error_t MSYM_EXPORT msymGetSALCs(msym_context ctx, int l, double c[l][l], int species[l], msym_partner_function_t pf[l]); #endif msym_error_t MSYM_EXPORT msymSymmetrySpeciesComponents(msym_context ctx, int wfl, double *wf, int sl, double *s); - msym_error_t MSYM_EXPORT msymGenerateElements(msym_context ctx, int length, msym_element_t *elements); + msym_error_t MSYM_EXPORT msymGenerateElements(msym_context ctx, int length, msym_element_t elements[length]); msym_error_t MSYM_EXPORT msymGenerateSubrepresentationSpaces(msym_context ctx); msym_error_t MSYM_EXPORT msymAlignAxes(msym_context ctx);