From cf87857bf7f5266de5d00f5728b6b3e66a6930ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Mon, 10 Sep 2012 22:46:26 +0200 Subject: [PATCH] fix a bunch of clang warning --- hkl/hkl-binding.c | 1 + hkl/hkl-geometry-factory.c | 2 ++ hkl/hkl-pseudoaxis-auto.c | 8 ++++---- hkl/hkl-pseudoaxis-private.h | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hkl/hkl-binding.c b/hkl/hkl-binding.c index 80edb650..0212e712 100644 --- a/hkl/hkl-binding.c +++ b/hkl/hkl-binding.c @@ -73,6 +73,7 @@ gboolean hkl_parameter_list_set_values_unit_binding(HklParameterList *self, return FALSE; } + return TRUE; } /** diff --git a/hkl/hkl-geometry-factory.c b/hkl/hkl-geometry-factory.c index f7b7d01c..9cd6b3b0 100644 --- a/hkl/hkl-geometry-factory.c +++ b/hkl/hkl-geometry-factory.c @@ -244,6 +244,8 @@ HklGeometry *hkl_geometry_factory_new(const HklGeometryConfig *config, ...) parameters[0] = va_arg(ap, double); va_end(ap); break; + default: + break; } geometry = hkl_geometry_factory_newv(config, parameters, len); if(parameters) diff --git a/hkl/hkl-pseudoaxis-auto.c b/hkl/hkl-pseudoaxis-auto.c index 724d9abd..30a04de8 100644 --- a/hkl/hkl-pseudoaxis-auto.c +++ b/hkl/hkl-pseudoaxis-auto.c @@ -307,10 +307,10 @@ static int solve_function(HklEngine *self, { size_t i; - int *p = alloca(function->size * sizeof(*p)); - double *x0 = alloca(function->size * sizeof(*x0)); - int *degenerated = alloca(function->size * sizeof(*degenerated)); - size_t *op_len = alloca(function->size * sizeof(*op_len)); + int p[function->size]; + double x0[function->size]; + int degenerated[function->size]; + size_t op_len[function->size]; int res; gsl_vector *_x; /* use to compute sectors in perm_r (avoid copy) */ gsl_vector *_f; /* use to test sectors in perm_r (avoid copy) */ diff --git a/hkl/hkl-pseudoaxis-private.h b/hkl/hkl-pseudoaxis-private.h index fd06b0e1..0f6bae33 100644 --- a/hkl/hkl-pseudoaxis-private.h +++ b/hkl/hkl-pseudoaxis-private.h @@ -125,6 +125,7 @@ static int hkl_mode_get_real(HklMode *self, HklSample *sample, HklError **error) { + return HKL_TRUE; } static int hkl_mode_set_real(HklMode *self, @@ -134,6 +135,7 @@ static int hkl_mode_set_real(HklMode *self, HklSample *sample, HklError **error) { + return HKL_TRUE; } static inline int hkl_mode_init( -- 2.11.4.GIT