case SR_CONF_DEVICE_OPTIONS:
if (!cg) {
if (model)
- *data = std_gvar_array_u32((const uint32_t *)model->devopts, model->num_devopts);
+ *data = std_gvar_array_u32(*model->devopts, model->num_devopts);
else
*data = std_gvar_array_u32(ARRAY_AND_SIZE(drvopts));
} else if (cg_type == CG_ANALOG) {
- *data = std_gvar_array_u32((const uint32_t *)model->devopts_cg_analog, model->num_devopts_cg_analog);
+ *data = std_gvar_array_u32(*model->devopts_cg_analog, model->num_devopts_cg_analog);
} else {
*data = std_gvar_array_u32(NULL, 0);
}
SR_PRIV GVariant *std_gvar_tuple_u64(uint64_t low, uint64_t high);
SR_PRIV GVariant *std_gvar_tuple_double(double low, double high);
-SR_PRIV GVariant *std_gvar_array_i32(const int32_t *a, unsigned int n);
-SR_PRIV GVariant *std_gvar_array_u32(const uint32_t *a, unsigned int n);
-SR_PRIV GVariant *std_gvar_array_u64(const uint64_t *a, unsigned int n);
+SR_PRIV GVariant *std_gvar_array_i32(const int32_t a[], unsigned int n);
+SR_PRIV GVariant *std_gvar_array_u32(const uint32_t a[], unsigned int n);
+SR_PRIV GVariant *std_gvar_array_u64(const uint64_t a[], unsigned int n);
SR_PRIV GVariant *std_gvar_array_str(const char *a[], unsigned int n);
SR_PRIV GVariant *std_gvar_thresholds(const double a[][2], unsigned int n);
return g_variant_new_tuple(range, 2);
}
-SR_PRIV GVariant *std_gvar_array_i32(const int32_t *a, unsigned int n)
+SR_PRIV GVariant *std_gvar_array_i32(const int32_t a[], unsigned int n)
{
return g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
a, n, sizeof(int32_t));
}
-SR_PRIV GVariant *std_gvar_array_u32(const uint32_t *a, unsigned int n)
+SR_PRIV GVariant *std_gvar_array_u32(const uint32_t a[], unsigned int n)
{
return g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
a, n, sizeof(uint32_t));
}
-SR_PRIV GVariant *std_gvar_array_u64(const uint64_t *a, unsigned int n)
+SR_PRIV GVariant *std_gvar_array_u64(const uint64_t a[], unsigned int n)
{
return g_variant_new_fixed_array(G_VARIANT_TYPE_UINT64,
a, n, sizeof(uint64_t));